ColorMatrix is a 4x5 matrix containing color multiplication
and offset values for tinting and other kinds of color
manipulation. In addition to using the multiplier, offset and
color properties, it can be edited directly as a Float32Array
Constructor
new (?data:Float32Array)
Variables
Methods
clone ():ColorMatrix
concat (second:ColorMatrix):Void
Adds the color multipliers from a second ColorMatrix to the current one
Parameters:
second | The |
|---|
copyFrom (other:ColorMatrix):Void
Sets the current ColorMatrix values to the same as another one
Parameters:
other | The |
|---|
Returns a reference to a UInt8Array table for transforming
alpha values using the current matrix.
The table is 256 values in length, and includes values based
on the alphaMultipler and alphaOffset values of the matrix.
The values are constrained within 0 and 255.
For example:
var colorMatrix = new ColorMatrix ();
colorMatrix.alphaOffset = 12;
var alphaTable = colorMatrix.getAlphaTable ();
trace (alphaTable[0]); // 12
trace (alphaTable[1]); // 13Returns a reference to a UInt8Array table for transforming
blue values using the current matrix.
The table is 256 values in length, and includes values based
on the blueMultiplier and blueOffset values of the matrix.
The values are constrained within 0 and 255.
For example:
var colorMatrix = new ColorMatrix ();
colorMatrix.blueOffset = 16;
var blueTable = colorMatrix.getBlueTable ();
trace (blueTable[0]); // 16
trace (blueTable[1]); // 17Returns a reference to a UInt8Array table for transforming
green values using the current matrix.
The table is 256 values in length, and includes values based
on the greenMultiplier and greenOffset values of the matrix.
The values are constrained within 0 and 255.
For example:
var colorMatrix = new ColorMatrix ();
colorMatrix.greenOffset = 16;
var greenTable = colorMatrix.getGreenTable ();
trace (greenTable[0]); // 16
trace (greenTable[1]); // 17Returns a reference to a UInt8Array table for transforming
red values using the current matrix.
The table is 256 values in length, and includes values based
on the redMultiplier and redOffset values of the matrix.
The values are constrained within 0 and 255.
For example:
var colorMatrix = new ColorMatrix ();
colorMatrix.redOffset = 16;
var redTable = colorMatrix.getRedTable ();
trace (redTable[0]); // 16
trace (redTable[1]); // 17