1 Reply Latest reply on Oct 6, 2009 7:38 AM by Thistledowne

    How to draw a rotated ellipse ?

    mighty_scoop

      Hi together,

       

      for sure a beginner question ... but i'm stuck ...

      in a small paint application there is the possiblibity to draw shapes (e.x. ellipses). After creating the shapes the user is able to "draw "the shapes to an underlying layer (with the drawTo method) ... sadly i don't know where and how to get a rotation into this function ... drawEllipse only takes 4 arguments ... any help ?

       

       

      Code:
      // draw ellipse
      override public function drawTo(component:UIComponent):void
      {          
           component.graphics.beginFill(color);
           component.graphics.drawEllipse(x / component.scaleX, y /        
                  component.scaleY, width / component.scaleX, height / 
                  component.scaleY);
           component.graphics.endFill();                                        
      }
      
      
      

      Thx