Qt4 Touch and Rotate

May 7, 2009 Matteo Bertozzi | Filed Under Qt4 | No Comments

Alan has asked my How I’ve implemented the Touch and Rotate feature of the Moko. The answer is very simple, It’s all Magic! There’re very few lines of code to do it, because all the magic is made by atan2.

Atan2 is a variation of the arctangent function. For any real arguments x and y not both equal to zero, atan2(y, x) is the angle in radians between the positive x-axis of a plane and the point given by the coordinates (x, y) on it.

Qt Touch and Rotate

The Source Code is available here: Qt4 Touch and Rotate Source Code.

OT: PyCon3 (Italia) starts Tomorrow!

No Comments yet »

RSS feed for comments on this post. TrackBack URI

Leave a comment

XHTML: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>