topical media & game development

talk show tell print

#graphic-flex-image-effects-07-source-aether-effects-filters-ColorMatrixEffect.ax

#graphic-flex-image-effects-07-source-aether-effects-filters-ColorMatrixEffect.ax [swf] [flash] flex


  package aether.effects.filters {
          
          import flash.filters.ColorMatrixFilter;
          
          public class @ax-graphic-flex-image-effects-07-source-aether-effects-filters-ColorMatrixEffect extends BitmapFilterEffect {
          
                  static public var GRAYSCALE:Array = [.3, .59, .11, 0, 0, .3, .59, .11, 0, 0, .3, .59, .11, 0, 0, 0, 0, 0, 1, 0];
                  static public var SEPIA:Array = [.5, .59, .11, 0, 0, .4, .59, .11, 0, 0, .16, .59, .11, 0, 0, 0, 0, 0, 1, 0];
                  static public var IDENTITY:Array = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0];
  
                  private var _matrix:Array;
  
                  public function @ax-graphic-flex-image-effects-07-source-aether-effects-filters-ColorMatrixEffect(matrix:Array, blendMode:String=null, alpha:Number=1) {
                          var filter:ColorMatrixFilter = new ColorMatrixFilter(matrix);
                          super(filter, blendMode, alpha);
                  }
          
          }
          
  }


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