CanvasScript3
>
Tests
> BitmapData - ApplyFilter
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); var point = new Point(0, bottomHalf.y); var filter = new BlurFilter(10, 10, 1); bitmapdata.applyFilter(bitmapdata, bottomHalf, point, filter); }); loader.load(new URLRequest('img/photo01.jpg')); stage.addChild(loader);
Canvas
Output