Rotate a drawn rectangle in flex

Posted by Arif on Stack Overflow See other posts from Stack Overflow or by Arif
Published on 2010-05-18T12:35:16Z Indexed on 2010/05/27 16:01 UTC
Read the original article Hit count: 212

Filed under:

i wrote the following code for drawing a rotate rectangle

var s:UIComponent = new UIComponent();    
s.graphics.lineStyle(1, 0x0000FF);
s.graphics.drawRect(50, 50, 200, 200);
s.rotation = 30;
template.addChild(s);

where template is a canvas. Its rotate nicely but the problem is the position is not in right place. i.e. it is not in (50,50) after rotate. How can i solve this problem?

Thanks in advance.

© Stack Overflow or respective owner

Related posts about flex