CanvasScript3
>
Tests
> Graphics - BeginBitmapFill
Code
var stage = new Stage("canvas", 420, 500, 30); var shape; var loader = new Loader(); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, function(e) { var bitmapData = loader.content.bitmapData; shape = new Shape(); shape.graphics.beginBitmapFill(bitmapData, 'repeat'); shape.graphics.drawRect(0, 0, 420, 500); shape.graphics.endFill(); stage.addChild(shape); }); loader.load(new URLRequest('img/pattern.png'));
Canvas
Output