CanvasScript3
>
Tests
> Graphics - DrawArc
Code
var stage = new Stage("canvas", 420, 500, 30); var shape; //draw an arc shape = new Shape(); shape.x = 20; shape.y = 20; shape.graphics.lineStyle(0); shape.graphics.beginFill(0x0000FF); shape.graphics.drawArc(50, 50, 50, 0, 2.6, false); shape.graphics.endFill(); stage.addChild(shape); //draw an arc with strokes shape = new Shape(); shape.x = 140; shape.y = 20; shape.graphics.lineStyle(10, 0xFF0000); shape.graphics.drawArc(50, 50, 50, 0, 2.6, false); stage.addChild(shape); //draw an arc with strokes and fill shape = new Shape(); shape.x = 260; shape.y = 20; shape.graphics.lineStyle(10, 0xFF0000); shape.graphics.beginFill(0x0000FF); shape.graphics.drawArc(50, 50, 50, 0, 2.6, false); stage.addChild(shape); //draw an arc with alpha fill shape = new Shape(); shape.x = 20; shape.y = 140; shape.graphics.lineStyle(10, 0xFF0000); shape.graphics.beginFill(0x0000FF, 0.5); shape.graphics.drawArc(50, 50, 50, 0, 2.6, false); stage.addChild(shape); //draw an arc with alpha stroke shape = new Shape(); shape.x = 140; shape.y = 140; shape.graphics.lineStyle(10, 0xFF0000, 0.5); shape.graphics.beginFill(0x0000FF); shape.graphics.drawArc(50, 50, 50, 0, 2.6, false); stage.addChild(shape); //draw an arc with alpha fill and stroke shape = new Shape(); shape.x = 260; shape.y = 140; shape.graphics.lineStyle(10, 0xFF0000, 0.5); shape.graphics.beginFill(0x0000FF, 0.5); shape.graphics.drawArc(50, 50, 50, 0, 2.6, false); stage.addChild(shape);
Canvas
Output