0 Replies Latest reply on Nov 9, 2010 8:16 AM by SiHoop

    Drawing with graphics

    SiHoop Level 1

      If I draw a rounded rectangle from top to bottom, the corners are nicely rounded. If I draw the rectangle from bottom to top the entire shape is rounded instead of just the corners. How can I draw from bottom to top and still round just the corners?

       

       

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"   creationComplete="init()">
          <mx:Script>
              <![CDATA[
                  private function init():void{
                      canvas.graphics.beginFill(0xffff00);
                      canvas.graphics.drawRoundRect(300,300,50,200, 20, 20);
                      canvas.graphics.drawRoundRect(600,500,50,-200, 20, 20);
                  }
              ]]>
          </mx:Script>
      <mx:Canvas id="canvas"    />
      </mx:Application>