Drawing Curves: curveTo(controlX:Number, controlY:Number, anchorX:Number, anchorY:Number) : Curve « Graphics « Flash / Flex / ActionScript






Drawing Curves: curveTo(controlX:Number, controlY:Number, anchorX:Number, anchorY:Number)

 

package{
  import flash.display.*;
  
  public class Main extends Sprite{
    public function Main(){
        var canvas:Shape = new Shape(  );
        addChild(canvas);
        canvas.graphics.lineStyle(4);  // Set the stroke to 4-point, black
        canvas.graphics.curveTo(50, 100, 100, 0);  // Draw the curve
    }
  }
}

        








Related examples in the same category

1.Drawing Curves in a Graphics Object
2.Curve control point