Thus spake Jeff Abernathy: > Hello all, > > I need to rotate an image element in increments of 90 degrees, and I would li > ke the image to originate at the same x and y coordinate after the rotation i > s applied. I'm not quite sure how to calculate the correct translate transfor > mation in order to achieve this. Has anyone done this before?
The center of your image is (w/2,h/2). Rotation is always about the origin, (0,0). What you need to do is move the center to be at the origin, do your rotation, an then move the center back to where it was. So translate by (-w/2,-h/2), rotate, and then translate by (w/2,h/2). -- J. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
