summaryrefslogtreecommitdiff
path: root/webcam/com
diff options
context:
space:
mode:
authordumpfmprod <dumpfmprod@ubuntu.(none)>2010-04-01 03:28:54 -0400
committerdumpfmprod <dumpfmprod@ubuntu.(none)>2010-04-01 03:28:54 -0400
commitaa3165c303d8feb2a34329539c67bd71863c9eb4 (patch)
tree2509b6c376e41497276ad477eefd594002482ca1 /webcam/com
parent5650b9a43736f191dd13b4ec5fdc11f18a9e96d6 (diff)
timb comitting prod changes
Diffstat (limited to 'webcam/com')
-rwxr-xr-xwebcam/com/neave/webcam/NeaveWebcam.as2
-rwxr-xr-xwebcam/com/neave/webcam/effects/EffectType.as2
-rwxr-xr-xwebcam/com/neave/webcam/effects/EffectsManager.as2
3 files changed, 4 insertions, 2 deletions
diff --git a/webcam/com/neave/webcam/NeaveWebcam.as b/webcam/com/neave/webcam/NeaveWebcam.as
index 811446b..5372ad5 100755
--- a/webcam/com/neave/webcam/NeaveWebcam.as
+++ b/webcam/com/neave/webcam/NeaveWebcam.as
@@ -72,6 +72,8 @@ package com.neave.webcam
// Create a sprite to hold the bitmap
videoContainer = new Sprite();
videoContainer.addChild(videoBitmap);
+ videoContainer.scaleX = -1;
+ videoContainer.x = w;
addChild(videoContainer);
}
diff --git a/webcam/com/neave/webcam/effects/EffectType.as b/webcam/com/neave/webcam/effects/EffectType.as
index 217dcb5..3c9967d 100755
--- a/webcam/com/neave/webcam/effects/EffectType.as
+++ b/webcam/com/neave/webcam/effects/EffectType.as
@@ -1 +1 @@
-/** * Neave Webcam // Effects Type * * 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 { final public class EffectType { static public const NORMAL :int = 0; static public const RAINBOW :int = 1; //static public const MIRROR_RIGHT :int = 2; //static public const MIRROR_TOP :int = 3; //static public const MIRROR_BOTTOM :int = 2; static public const MIRROR_INVERSE :int = 2; //static public const MIRROR_QUAD :int = 6; static public const UPSIDE_DOWN :int = 3; //static public const DIVIDE :int = 8; //static public const FILMSTRIP :int = 9; static public const FRAGMENT :int = 4; static public const SEPIA :int = 5; //static public const TRAIL :int = 12; //static public const BULGE :int = 13; //static public const FISHEYE :int = 14; //static public const FISHBOWL :int = 15; //static public const DENT :int = 16; ///static public const SQUEEZE :int = 17; static public const WATER :int = 6; static public const FIRE :int = 7; static public const SNOW :int = 8; //static public const STEAM :int = 21; static public const SWARM :int = 9; //static public const PIXELATE :int = 23; //static public const RGB :int = 24; //static public const HALFTONE :int = 25; static public const MONOCHROME :int = 10; static public const GHOST :int = 11; static public const MIRROR_LEFT :int = 12; //static public const ASCII :int = 14; //static public const X_RAY :int = 30; //static public const WARHOL :int = 31; static public const GLOW :int = 13; static public const SLIT_SCAN :int = 14; static public const TOTAL_EFFECTS :int = 14; public function EffectType() { } } } \ No newline at end of file
+/** * Neave Webcam // Effects Type * * 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 { final public class EffectType { /*static public const NORMAL :int = 0; static public const RAINBOW :int = 1; //static public const MIRROR_RIGHT :int = 2; //static public const MIRROR_TOP :int = 3; //static public const MIRROR_BOTTOM :int = 2; static public const MIRROR_INVERSE :int = 2; //static public const MIRROR_QUAD :int = 6; static public const UPSIDE_DOWN :int = 3; //static public const DIVIDE :int = 8; //static public const FILMSTRIP :int = 9; static public const FRAGMENT :int = 4; static public const SEPIA :int = 5; //static public const TRAIL :int = 12; //static public const BULGE :int = 13; //static public const FISHEYE :int = 14; //static public const FISHBOWL :int = 15; //static public const DENT :int = 16; ///static public const SQUEEZE :int = 17; static public const WATER :int = 6; static public const FIRE :int = 7; static public const SNOW :int = 8; //static public const STEAM :int = 21; static public const SWARM :int = 9; //static public const PIXELATE :int = 23; //static public const RGB :int = 24; //static public const HALFTONE :int = 25; static public const MONOCHROME :int = 10; static public const GHOST :int = 11; static public const MIRROR_LEFT :int = 12; //static public const ASCII :int = 14; //static public const X_RAY :int = 30; //static public const WARHOL :int = 31; static public const GLOW :int = 13; static public const SLIT_SCAN :int = 14;*/ static public const NORMAL :int = 0; static public const GLOW :int = 1; static public const WARHOL :int = 2; static public const HALFTONE :int = 3; static public const SEPIA :int = 4; static public const MONOCHROME :int = 5; static public const X_RAY :int = 6; static public const DIVIDE :int = 7; static public const SLIT_SCAN :int = 8; static public const MIRROR_INVERSE :int = 9; static public const MIRROR_TOP :int = 10; static public const UPSIDE_DOWN :int = 11; static public const MIRROR_LEFT :int = 12; static public const BULGE :int = 13; static public const SQUEEZE :int = 14; static public const FISHEYE :int = 15; static public const GHOST :int = 16; static public const TRAIL :int = 17; static public const WATER :int = 18; static public const SNOW :int = 19; static public const FIRE :int = 20; static public const SWARM :int = 21; static public const TOTAL_EFFECTS :int = 21; public function EffectType() { } } } \ No newline at end of file
diff --git a/webcam/com/neave/webcam/effects/EffectsManager.as b/webcam/com/neave/webcam/effects/EffectsManager.as
index a5fa050..0c898c8 100755
--- a/webcam/com/neave/webcam/effects/EffectsManager.as
+++ b/webcam/com/neave/webcam/effects/EffectsManager.as
@@ -1 +1 @@
-/** * Neave Webcam // Effects Manager * * 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 { import flash.display.*; import flash.events.*; import com.neave.webcam.effects.color.*; import com.neave.webcam.effects.delay.*; import com.neave.webcam.effects.displace.*; import com.neave.webcam.effects.mirror.*; import com.neave.webcam.effects.motion.*; import com.neave.webcam.effects.pixel.*; public class EffectsManager extends EventDispatcher { private var source:IBitmapDrawable; private var targetBitmap:BitmapData; private var effect:AbstractEffect; private var chosenEffect:int; /** * Manages all of the webcam effects * * @param source The source object to use for the effect * @param targetBitmap The target bitmap data to draw the resulting effect into */ public function EffectsManager(source:IBitmapDrawable, targetBitmap:BitmapData) { this.source = source; this.targetBitmap = targetBitmap; // Start with the normal effect effectType = EffectType.NORMAL; } /** * Sets the effect to the next effect in the EffectType class */ public function nextEffect():void { effectType = chosenEffect + 1; } /** * Sets the effect to the previous effect in the EffectType class */ public function previousEffect():void { effectType = chosenEffect - 1; } /** * An integer representing the current effect in the EffectType class */ public function set effectType(type:int):void { // Remove the previous effect if (effect != null) effect.destroy(); // Wrap the chosen effect within the total effects available if (type > EffectType.TOTAL_EFFECTS) type = 0; if (type < 0) type = EffectType.TOTAL_EFFECTS; // Set the effect switch (type) { case EffectType.MIRROR_LEFT: effect = new LeftMirrorEffect (source, targetBitmap); break; //case EffectType.MIRROR_RIGHT: effect = new RightMirrorEffect (source, targetBitmap); break; //case EffectType.MIRROR_TOP: effect = new TopMirrorEffect (source, targetBitmap); break; //case EffectType.MIRROR_BOTTOM: effect = new BottomMirrorEffect (source, targetBitmap); break; case EffectType.MIRROR_INVERSE: effect = new InverseMirrorEffect (source, targetBitmap); break; //case EffectType.MIRROR_QUAD: effect = new QuadMirrorEffect (source, targetBitmap); break; case EffectType.UPSIDE_DOWN: effect = new UpsideDownEffect (source, targetBitmap); break; //case EffectType.DIVIDE: effect = new DivideEffect (source, targetBitmap); break; //case EffectType.FILMSTRIP: effect = new FilmstripEffect (source, targetBitmap); break; case EffectType.FRAGMENT: effect = new FragmentEffect (source, targetBitmap); break; case EffectType.GHOST: effect = new GhostEffect (source, targetBitmap); break; //case EffectType.TRAIL: effect = new TrailEffect (source, targetBitmap); break; //case EffectType.BULGE: effect = new BulgeEffect (source, targetBitmap); break; //case EffectType.FISHEYE: effect = new FisheyeEffect (source, targetBitmap); break; //case EffectType.FISHBOWL: effect = new FishbowlEffect (source, targetBitmap); break; //case EffectType.DENT: effect = new DentEffect (source, targetBitmap); break; //case EffectType.SQUEEZE: effect = new SqueezeEffect (source, targetBitmap); break; case EffectType.WATER: effect = new WaterEffect (source, targetBitmap); break; case EffectType.FIRE: effect = new FireEffect (source, targetBitmap); break; case EffectType.SNOW: effect = new SnowEffect (source, targetBitmap); break; //case EffectType.STEAM: effect = new SteamEffect (source, targetBitmap); break; case EffectType.SWARM: effect = new SwarmEffect (source, targetBitmap); break; //case EffectType.PIXELATE: effect = new PixelateEffect (source, targetBitmap); break; //case EffectType.RGB: effect = new RGBEffect (source, targetBitmap); break; //case EffectType.HALFTONE: effect = new HalftoneEffect (source, targetBitmap); break; case EffectType.MONOCHROME: effect = new MonochromeEffect (source, targetBitmap); break; case EffectType.SEPIA: effect = new SepiaEffect (source, targetBitmap); break; case EffectType.RAINBOW: effect = new RainbowEffect (source, targetBitmap); break; //case EffectType.ASCII: effect = new ASCIIEffect (source, targetBitmap); break; //case EffectType.X_RAY: effect = new XRayEffect (source, targetBitmap); break; //case EffectType.WARHOL: effect = new WarholEffect (source, targetBitmap); break; case EffectType.GLOW: effect = new GlowEffect (source, targetBitmap); break; case EffectType.SLIT_SCAN: effect = new SlitScanEffect (source, targetBitmap); break; case EffectType.NORMAL: default: // Use a normal effect if the passed effect type is not valid type = EffectType.NORMAL; effect = new NormalEffect(source, targetBitmap); break; } // Remember the chosen effect chosenEffect = type; // Tell anything listening that a new effect has been chosen dispatchEvent(new EffectEvent(EffectEvent.NEW_EFFECT, false, false, chosenEffect)); } /** * An integer representing the current effect in the EffectType class */ public function get effectType():int { return chosenEffect; } /** * The proper name of the current effect */ public function get effectName():String { return effect.effectName; } /** * Updates the appearance of the current effect */ public function update():void { effect.draw(); } /** * Removes the current effect */ public function destroy():void { effect.destroy(); } } } \ No newline at end of file
+/** * Neave Webcam // Effects Manager * * 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 { import flash.display.*; import flash.events.*; import com.neave.webcam.effects.color.*; import com.neave.webcam.effects.delay.*; import com.neave.webcam.effects.displace.*; import com.neave.webcam.effects.mirror.*; import com.neave.webcam.effects.motion.*; import com.neave.webcam.effects.pixel.*; public class EffectsManager extends EventDispatcher { private var source:IBitmapDrawable; private var targetBitmap:BitmapData; private var effect:AbstractEffect; private var chosenEffect:int; /** * Manages all of the webcam effects * * @param source The source object to use for the effect * @param targetBitmap The target bitmap data to draw the resulting effect into */ public function EffectsManager(source:IBitmapDrawable, targetBitmap:BitmapData) { this.source = source; this.targetBitmap = targetBitmap; // Start with the normal effect effectType = EffectType.NORMAL; } /** * Sets the effect to the next effect in the EffectType class */ public function nextEffect():void { effectType = chosenEffect + 1; } /** * Sets the effect to the previous effect in the EffectType class */ public function previousEffect():void { effectType = chosenEffect - 1; } /** * An integer representing the current effect in the EffectType class */ public function set effectType(type:int):void { // Remove the previous effect if (effect != null) effect.destroy(); // Wrap the chosen effect within the total effects available if (type > EffectType.TOTAL_EFFECTS) type = 0; if (type < 0) type = EffectType.TOTAL_EFFECTS; // Set the effect switch (type) { case EffectType.GLOW: effect = new GlowEffect (source, targetBitmap); break; case EffectType.WARHOL: effect = new WarholEffect (source, targetBitmap); break; case EffectType.SEPIA: effect = new SepiaEffect (source, targetBitmap); break; case EffectType.MONOCHROME: effect = new MonochromeEffect (source, targetBitmap); break; case EffectType.X_RAY: effect = new XRayEffect (source, targetBitmap); break; case EffectType.DIVIDE: effect = new DivideEffect (source, targetBitmap); break; case EffectType.SLIT_SCAN: effect = new SlitScanEffect (source, targetBitmap); break; case EffectType.MIRROR_INVERSE: effect = new InverseMirrorEffect (source, targetBitmap); break; case EffectType.MIRROR_TOP: effect = new TopMirrorEffect (source, targetBitmap); break; case EffectType.UPSIDE_DOWN: effect = new UpsideDownEffect (source, targetBitmap); break; case EffectType.MIRROR_LEFT: effect = new LeftMirrorEffect (source, targetBitmap); break; case EffectType.BULGE: effect = new BulgeEffect (source, targetBitmap); break; case EffectType.SQUEEZE: effect = new SqueezeEffect (source, targetBitmap); break; case EffectType.FISHEYE: effect = new FisheyeEffect (source, targetBitmap); break; case EffectType.GHOST: effect = new GhostEffect (source, targetBitmap); break; case EffectType.TRAIL: effect = new TrailEffect (source, targetBitmap); break; case EffectType.WATER: effect = new WaterEffect (source, targetBitmap); break; case EffectType.SNOW: effect = new SnowEffect (source, targetBitmap); break; case EffectType.FIRE: effect = new FireEffect (source, targetBitmap); break; case EffectType.SWARM: effect = new SwarmEffect (source, targetBitmap); break; /*case EffectType.MIRROR_LEFT: effect = new LeftMirrorEffect (source, targetBitmap); break; //case EffectType.MIRROR_RIGHT: effect = new RightMirrorEffect (source, targetBitmap); break; //case EffectType.MIRROR_TOP: effect = new TopMirrorEffect (source, targetBitmap); break; //case EffectType.MIRROR_BOTTOM: effect = new BottomMirrorEffect (source, targetBitmap); break; case EffectType.MIRROR_INVERSE: effect = new InverseMirrorEffect (source, targetBitmap); break; //case EffectType.MIRROR_QUAD: effect = new QuadMirrorEffect (source, targetBitmap); break; case EffectType.UPSIDE_DOWN: effect = new UpsideDownEffect (source, targetBitmap); break; //case EffectType.DIVIDE: effect = new DivideEffect (source, targetBitmap); break; //case EffectType.FILMSTRIP: effect = new FilmstripEffect (source, targetBitmap); break; case EffectType.FRAGMENT: effect = new FragmentEffect (source, targetBitmap); break; case EffectType.GHOST: effect = new GhostEffect (source, targetBitmap); break; //case EffectType.TRAIL: effect = new TrailEffect (source, targetBitmap); break; //case EffectType.BULGE: effect = new BulgeEffect (source, targetBitmap); break; //case EffectType.FISHEYE: effect = new FisheyeEffect (source, targetBitmap); break; //case EffectType.FISHBOWL: effect = new FishbowlEffect (source, targetBitmap); break; //case EffectType.DENT: effect = new DentEffect (source, targetBitmap); break; //case EffectType.SQUEEZE: effect = new SqueezeEffect (source, targetBitmap); break; case EffectType.WATER: effect = new WaterEffect (source, targetBitmap); break; case EffectType.FIRE: effect = new FireEffect (source, targetBitmap); break; case EffectType.SNOW: effect = new SnowEffect (source, targetBitmap); break; //case EffectType.STEAM: effect = new SteamEffect (source, targetBitmap); break; case EffectType.SWARM: effect = new SwarmEffect (source, targetBitmap); break; //case EffectType.PIXELATE: effect = new PixelateEffect (source, targetBitmap); break; //case EffectType.RGB: effect = new RGBEffect (source, targetBitmap); break; //case EffectType.HALFTONE: effect = new HalftoneEffect (source, targetBitmap); break; case EffectType.MONOCHROME: effect = new MonochromeEffect (source, targetBitmap); break; case EffectType.SEPIA: effect = new SepiaEffect (source, targetBitmap); break; case EffectType.RAINBOW: effect = new RainbowEffect (source, targetBitmap); break; //case EffectType.ASCII: effect = new ASCIIEffect (source, targetBitmap); break; //case EffectType.X_RAY: effect = new XRayEffect (source, targetBitmap); break; //case EffectType.WARHOL: effect = new WarholEffect (source, targetBitmap); break; case EffectType.GLOW: effect = new GlowEffect (source, targetBitmap); break; case EffectType.SLIT_SCAN: effect = new SlitScanEffect (source, targetBitmap); break;*/ case EffectType.NORMAL: default: // Use a normal effect if the passed effect type is not valid type = EffectType.NORMAL; effect = new NormalEffect(source, targetBitmap); break; } // Remember the chosen effect chosenEffect = type; // Tell anything listening that a new effect has been chosen dispatchEvent(new EffectEvent(EffectEvent.NEW_EFFECT, false, false, chosenEffect)); } /** * An integer representing the current effect in the EffectType class */ public function get effectType():int { return chosenEffect; } /** * The proper name of the current effect */ public function get effectName():String { return effect.effectName; } /** * Updates the appearance of the current effect */ public function update():void { effect.draw(); } /** * Removes the current effect */ public function destroy():void { effect.destroy(); } } } \ No newline at end of file