CanvasScript3
>
Tests
> BitmapData - FillRect
Code
var stage = new Stage("canvas", 420, 500, 30); var loader = new Loader(); loader.contentLoaderInfo.addEventListener(Event.COMPLETE, function(e) { var bitmap = loader.content; var bitmapdata = bitmap.bitmapData; var bottomHalf = new Rectangle(0, 250, 420, 250); bitmapdata.fillRect(bottomHalf, 0xFFFF0000); }); loader.load(new URLRequest('img/photo01.jpg')); stage.addChild(loader);
Canvas
Output