Archive

Archive for September, 2012

Rotated Rectangle & Bouding box

September 4, 2012 Leave a comment

Here’s a problem wich can become quickly a real headache, and so far I didn’t find any simple and clear solution on the web.

You have a component, you make it rotated. You want the bouding box coordinates. You will find plenty of algorithms on the net to get that, but none of them worked for me. After a long while trying many differents things, I figured out that flex proposes already all what we need :

getLayoutBoundsX(true);
getLayoutBoundsY(true);
getLayoutBoundsHeight(true);
getLayoutBoundsWidth(true);

Categories: Uncategorized