Wrong mous Position when transformating the matrix
- From: Fionn Ziegler <fionnziegler gmail com>
- To: goocanvas-list gnome org
- Subject: Wrong mous Position when transformating the matrix
- Date: Wed, 29 Dec 2010 17:42:03 +0100
Hi,
I'm changing the orientation of my Ball (GooCanvasItem) with this code:
angle = math.atan2(rotation[0], rotation[1]);
matrix2 = cairo.Matrix(1, 0, 0, 1, 0, 0)
matrix2.translate(x2, y2)
matrix2.rotate(angle);
matrix2.translate(-x2, -y2)
goo.set_transform(matrix2)
I also have a function when I press on the ball, hold the mouse
button and move the mouse to another position it should draw a line
between the Ball and the current mouse position.
Since I transform the GooCanvasItem by rotating, it won't work. Seems
like it draws with the current angle (wrong direction).
Any ideas??
Thanks + regards,
Fionn
Video with rotation (don't work): http://vimeo.com/18212663
Without rotation (fine): http://vimeo.com/17441708
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]