How to rotate a graphic

Scott Rossi scott at tactilemedia.com
Sat Nov 14 13:18:35 EST 2009


Recently, Colin Holgate wrote:

> what is the reason that the rectangle itself doesn't rotate? You can set the
> loc of a graphic, and that works, and you can set the angle of the graphic,
> and put it to see that it's changed, but the graphic hasn't rotated.

I'll guess the reason is because the graphic architecture is somewhat
outdated.  You *can* rotate a polygon graphic in degree increments (plus
there are math routines in the list archives that allow you to rotate a
polygon directly).  Tip: if you're going to do multiple rotations on a
polygon, it can be helpful to store the original points of the graphic to
keep it from distorting.

Even then, everything is based on whole pixel positions which makes for
somewhat coarse results when rotating (object will appear to bounce up and
down and get distorted).  There's been talk of getting Rev to use sub-pixel
positioning, but there's been no word on when this is going to happen.

Regards,

Scott Rossi
Creative Director
Tactile Media, Multimedia & Design





More information about the use-livecode mailing list