CanvasScript3
>
Tests
> Graphics - DrawCircle
Code
var stage = new Stage("canvas", 420, 500, 30); var shape; //draw a circle shape = new Shape(); shape.x = 20; shape.y = 20; shape.graphics.lineStyle(0); shape.graphics.beginFill(0x0000FF); shape.graphics.drawCircle(50, 50, 50); shape.graphics.endFill(); stage.addChild(shape); //draw a circle with strokes shape = new Shape(); shape.x = 140; shape.y = 20; shape.graphics.lineStyle(10, 0xFF0000); shape.graphics.drawCircle(50, 50, 50); stage.addChild(shape); //draw a circle with strokes and fill shape = new Shape(); shape.x = 260; shape.y = 20; shape.graphics.lineStyle(10, 0xFF0000); shape.graphics.beginFill(0x0000FF); shape.graphics.drawCircle(50, 50, 50); stage.addChild(shape); //draw a circle 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.drawCircle(50, 50, 50); stage.addChild(shape); //draw a circle 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.drawCircle(50, 50, 50); stage.addChild(shape); //draw a circle 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.drawCircle(50, 50, 50); stage.addChild(shape);
Canvas
Output