diff options
Diffstat (limited to 'webcam/webcam/effects/mirror/AbstractMirrorEffect.as')
| -rw-r--r-- | webcam/webcam/effects/mirror/AbstractMirrorEffect.as | 68 |
1 files changed, 0 insertions, 68 deletions
diff --git a/webcam/webcam/effects/mirror/AbstractMirrorEffect.as b/webcam/webcam/effects/mirror/AbstractMirrorEffect.as deleted file mode 100644 index decb011..0000000 --- a/webcam/webcam/effects/mirror/AbstractMirrorEffect.as +++ /dev/null @@ -1,68 +0,0 @@ -/** - * Neave Webcam // Abstract Mirror Effect - * - * Copyright (C) 2008 Paul Neave - * http://www.neave.com/ - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation at http://www.gnu.org/licenses/gpl.html - */ - -package com.neave.webcam.effects.mirror -{ - import flash.display.*; - import flash.geom.*; - import com.neave.webcam.effects.*; - - internal class AbstractMirrorEffect extends AbstractEffect - { - protected var mirrorBitmap:BitmapData; - protected var mirrorMatrix:Matrix; - protected var mirrorPoint:Point; - - /** - * An abstract mirror effect class, not to be instantiated - * - * @param source The source object to use for the effect - * @param targetBitmap The target bitmap data to draw the resulting effect into - * @param name The proper name of the effect - */ - public function AbstractMirrorEffect(source:IBitmapDrawable, targetBitmap:BitmapData, name:String = "") - { - super(source, targetBitmap, name); - - createAbstractMirror(); - } - - /** - * Sets up the mirror effect - */ - private function createAbstractMirror():void - { - mirrorMatrix = new Matrix(); - mirrorPoint = new Point(); - } - - /** - * Draws the mirror effect - */ - override public function draw():void - { - super.draw(); - mirrorBitmap.draw(sourceBitmap, mirrorMatrix); - targetBitmap.copyPixels(sourceBitmap, rect, point); - targetBitmap.copyPixels(mirrorBitmap, rect, mirrorPoint); - } - - /** - * Removes the mirror effect and all other referenced objects - */ - override public function destroy():void - { - super.destroy(); - mirrorBitmap.dispose(); - mirrorBitmap = null; - } - } -}
\ No newline at end of file |
