       return new ColorMatrix( matrix );
     }
 
-    public function invert():void {
-      concat(
-        [ -1 ,  0,  0, 0, 255,
-           0 , -1,  0, 0, 255,
-           0 ,  0, -1, 0, 255,
-           0,   0,  0, 1,   0 ]
-      );
-    }
-
     /*
       Function: adjustSaturation
 

THE SOFTWARE.
*/

// Changes in v1.1:
// Changed the RGB to luminance constants
// Added colorize() method

// Changes in v1.2:
// Added clone()
// Added randomize()
// Added blend()
// Added "filter" property

// Changes in v1.3:
// Added invertAlpha()
// Added thresholdAlpha()

// Changes in v1.4:
// Added luminance2Alpha()

//Changes in v1.5
// Added rotateX();
// Added rotateY();
// Added rotateZ();
// Added shearZ();

//changes in v2.0
// AS3 optimizations
// Added setMultiplicators()
// Added clearChannels()
// Added rotateHue()
// Added transformVector()
// Added applyMatrix()
// Added rotateRed()
// Added rotateGreen()
// Added rotateBlue()
// Added shearRed()
// Added shearGreen()
// Added shearBlue()

//changes in v2.1
// Added applyColorDeficiency()

package com.thenduks.ilac {
  import flash.filters.ColorMatrixFilter;

  public class ColorMatrix {
    public static const COLOR_DEFICIENCY_TYPES:Array = [
      'Protanopia', 'Protanomaly', 'Deuteranopia',
      'Deuteranomaly', 'Tritanopia', 'Tritanomaly',
      'Achromatopsia', 'Achromatomaly'
    ];

    // RGB to Luminance conversion constants as found on
    // Charles A. Poynton's colorspace-faq:
    // http://www.faqs.org/faqs/graphics/colorspace-faq/
    private static const LUMA_R:Number = 0.212671;
    private static const LUMA_G:Number = 0.71516;
    private static const LUMA_B:Number = 0.072169;

    // There seem different standards for converting RGB
    // values to Luminance. This is the one by Paul Haeberli:
    private static const LUMA_R2:Number = 0.3086;
    private static const LUMA_G2:Number = 0.6094;
    private static const LUMA_B2:Number = 0.0820;

    private static const ONETHIRD:Number = 1 / 3;


    private static const RAD:Number = Math.PI / 180;

    public var matrix:Array;

    /*
      Function: ColorMatrix
