Subject: | Weird/incorrect event coordinates on rotated image |
Date: | Sat, 1 Oct 2016 23:55:31 +0800 |
To: | bug-Goo-Canvas [...] rt.cpan.org |
From: | Richard Hainsworth <rnhainsworth [...] gmail.com> |
I attach an image to a Goo::Canvas and rotate the image. Then move the
image by clicking on it.
If the image is rotated by zero degrees, then event coordinates ($ev->x,
$ev->y) are integers.
If the image is rotated, then event coordinates are not integers. Worst
problems occur when rotation is 180d.
perl -v
This is perl 5, version 22, subversion 1 (v5.22.1) built for
x86_64-linux-gnu-thread-multi
(with 58 registered patches, see perl -V for more detail)
uname -a
Linux ged 4.4.0-38-generic #57-Ubuntu SMP Tue Sep 6 15:42:33 UTC 2016
x86_64 x86_64 x86_64 GNU/Linux
lastest versions on all software.
Attached is a rot_bug.pl
This program runs without problems on my system (I chose an image that
should be on most Ubuntu). By clicking on the rotated icon generates
floating point numbers.
In the application I was developing, this caused severe run time issues.
Not sure why, may be some form of overflow.
My workaround was to create a group with an upper image that is used to
generate event coordinates, and to rotate a lower image.
Regards,
Richard
Message body is not shown because sender requested not to inline it.