API Documentation for: 0.6.0
Show:

ColorMatrix Class

Extends Array
Defined in: ColorMatrix:34
Module: EaselJS

Provides helper functions for assembling a matrix for use with the ColorMatrixFilter, or can be used directly as the matrix for a ColorMatrixFilter. Most methods return the instance to facilitate chained calls.

Example

 myColorMatrix.adjustHue(20).adjustBrightness(50);

See Filter for an example of how to apply filters.

Constructor

ColorMatrix

(
  • brightness
  • contrast
  • saturation
  • hue
)

Defined in ColorMatrix:34

Parameters:

Item Index

Properties

Methods

_cleanValue

() protected

Defined in _cleanValue:297

Make sure values are within the specified range, hue has a limit of 180, brightness is 255, others are 100.

_fixMatrix

() protected

Defined in _fixMatrix:307

Makes sure matrixes are 5x5 (25 long).

_multiplyMatrix

() protected

Defined in _multiplyMatrix:276

initialize

() protected

Defined in initialize:99

Initialization method.

reset

() ColorMatrix

Defined in reset:110

Resets the matrix to identity values.

Returns:

ColorMatrix: The ColorMatrix instance the method is called on (useful for chaining calls.)

Properties

DELTA_INDEX

Array static

Defined in DELTA_INDEX:56

Array of delta values for contrast calculations.

IDENTITY_MATRIX

Array static

Defined in IDENTITY_MATRIX:76

Identity matrix values.

LENGTH

Number static

Defined in LENGTH:90

The constant length of a color matrix.