PDA

View Full Version : rotated rectangle points


chandrakant
06-18-2009, 12:42 PM
I am drawing a rectangle.

I am rotating it dynamically.

Before rotation I have all four coordinates and center point of rectangle.

I am rotating rectangle on center point.

After rotation I have topleft point, center point and rotation angle.

I want to find rest of three points.

How can I find it ??

I know i have to use trignometry but i dont know exactly how to do.

Thanks,

wvxvw
06-18-2009, 02:01 PM
DisplayObject.getRect() | DisplayObject.getBounds() + DisplayObject.transform.matrix will do it.