topical media & game development

talk show tell print

#graphic-flex-image-effects-07-source-aether-effects-adjustments-LevelsEffect.ax

#graphic-flex-image-effects-07-source-aether-effects-adjustments-LevelsEffect.ax [swf] [flash] flex


  package aether.effects.adjustments {
          
          import aether.effects.ImageEffect;
          import aether.utils.Adjustments;
                  
          import flash.display.BitmapData;
          
          public class @ax-graphic-flex-image-effects-07-source-aether-effects-adjustments-LevelsEffect extends ImageEffect {
          
                  private var _blackPoint:uint;
                  private var _midPoint:uint;
                  private var _whitePoint:uint;
  
                  public function @ax-graphic-flex-image-effects-07-source-aether-effects-adjustments-LevelsEffect(
                          blackPoint:uint,
                          midPoint:uint,
                          whitePoint:uint,
                          blendMode:String=null,
                          alpha:Number=1
                  ) {
                          init(blendMode, alpha);
                          _blackPoint = blackPoint;
                          _midPoint = midPoint;
                          _whitePoint = whitePoint;
                  }
          
                  override protected function applyEffect(bitmapData:BitmapData):void {
                          Adjustments.setLevels(bitmapData, _blackPoint, _midPoint, _whitePoint);
                  }
          
          }
          
  }


(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.