topical media & game development
#graphic-flex-image-effects-07-source-aether-effects-transformations-TransformEffect.ax
#graphic-flex-image-effects-07-source-aether-effects-transformations-TransformEffect.ax
[swf]
[flash]
flex
package aether.effects.transformations {
import aether.effects.ImageEffect;
import flash.display.BitmapData;
import flash.geom.Matrix;
import flash.geom.Point;
public class @ax-graphic-flex-image-effects-07-source-aether-effects-transformations-TransformEffect extends ImageEffect {
private var _matrix:Matrix;
private var _bgColor:uint;
public function @ax-graphic-flex-image-effects-07-source-aether-effects-transformations-TransformEffect(
matrix:Matrix,
bgColor:uint=0,
blendMode:String=null,
alpha:Number=1
) {
init(blendMode, alpha);
_matrix = matrix;
_bgColor = bgColor;
}
override protected function applyEffect(bitmapData:BitmapData):void {
var copy:BitmapData = new BitmapData(bitmapData.width, bitmapData.height, true, _bgColor);
copy.draw(bitmapData, _matrix);
bitmapData.copyPixels(copy, copy.rect, new Point());
}
}
}
(C) Æliens
04/09/2009
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.