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
Static variables
Static methods
staticclone(this:Float32Array):ColorMatrix
staticconcat(this:Float32Array, second:ColorMatrix):Void
Adds the color multipliers from a second ColorMatrix
to the current one
Parameters:
second | The |
---|
staticcopyFrom(this:Float32Array, other:ColorMatrix):Void
Sets the current ColorMatrix
values to the same as another one
Parameters:
other | The |
---|
staticgetAlphaTable(this:Float32Array):UInt8Array
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]); // 13
staticgetBlueTable(this:Float32Array):UInt8Array
Returns 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]); // 17
staticgetGreenTable(this:Float32Array):UInt8Array
Returns 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]); // 17
staticgetRedTable(this:Float32Array):UInt8Array
Returns 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