CanvasScript3
>
Tests
> Graphics - DrawEllipse
Code
var stage = new Stage("canvas", 420, 500, 30); var shape; //draw a oval shape = new Shape(); shape.x = 100; shape.y = 20; shape.graphics.lineStyle(0); shape.graphics.beginFill(0x0000FF); shape.graphics.drawEllipse(0, 0, 200, 100); shape.graphics.endFill(); stage.addChild(shape); //draw a oval with strokes shape = new Shape(); shape.x = 100; shape.y = 140; shape.graphics.lineStyle(10, 0x00FF00); shape.graphics.drawEllipse(0, 0, 200, 100); stage.addChild(shape); //draw a oval with strokes and fill shape = new Shape(); shape.x = 100; shape.y = 260; shape.graphics.lineStyle(10, 0x00FF00); shape.graphics.beginFill(0x0000FF); shape.graphics.drawEllipse(0, 0, 200, 100); shape.graphics.endFill(); stage.addChild(shape);
Canvas
Output