Class: ColorMatrix

PhotoEditorSDK.Math~ ColorMatrix

Represents a 4 by 5 matrix that is used to preform color manipulations. The members are names a, b, c,..,t. The vector formed by e, j, o, t represents the offset.

new ColorMatrix(){PhotoEditorSDK.Math.ColorMatrix}

sdk/core/lib/math/color-matrix.js, line 38

Creates a color matrix, and defaults the values to the identity.

Returns:
Type Description
PhotoEditorSDK.Math.ColorMatrix

Members

staticPhotoEditorSDK.Math.ColorMatrix.IDENTITYPhotoEditorSDK.Math.ColorMatrix

The identity matrix

Methods

staticPhotoEditorSDK.Math.ColorMatrix.createBrightnessMatrix(brightness){PhotoEditorSDK.Math.ColorMatrix}

sdk/core/lib/math/color-matrix.js, line 280

Returns a color matrix that can be used to change the brightness.

Name Type Description
brightness Number
Returns:
Type Description
PhotoEditorSDK.Math.ColorMatrix

staticPhotoEditorSDK.Math.ColorMatrix.createContrastMatrix(contrast){PhotoEditorSDK.Math.ColorMatrix}

sdk/core/lib/math/color-matrix.js, line 293

Returns a color matrix that can be used to change the contrast.

Name Type Description
contrast Number
Returns:
Type Description
PhotoEditorSDK.Math.ColorMatrix

staticPhotoEditorSDK.Math.ColorMatrix.createExposureMatrix(saturation){PhotoEditorSDK.Math.ColorMatrix}

sdk/core/lib/math/color-matrix.js, line 333

Returns a color matrix that can be used to change the exposure.

Name Type Description
saturation Number
Returns:
Type Description
PhotoEditorSDK.Math.ColorMatrix

staticPhotoEditorSDK.Math.ColorMatrix.createLinearMatrix(slope, intercept){PhotoEditorSDK.Math.ColorMatrix}

sdk/core/lib/math/color-matrix.js, line 350

Returns a color matrix that can be used to apply linear changes.

Name Type Default Description
slope Number 1
intercept Number 0
Returns:
Type Description
PhotoEditorSDK.Math.ColorMatrix

staticPhotoEditorSDK.Math.ColorMatrix.createSaturationMatrix(saturation){PhotoEditorSDK.Math.ColorMatrix}

sdk/core/lib/math/color-matrix.js, line 306

Returns a color matrix that can be used to change the saturation.

Name Type Default Description
saturation Number 1
Returns:
Type Description
PhotoEditorSDK.Math.ColorMatrix

apply(color){Color}

sdk/core/lib/math/color-matrix.js, line 124

Applies the color matrix to the given color, and returns the resulting color.

Name Type Description
color Color
Returns:
Type Description
Color

clone(){PhotoEditorSDK.Math.ColorMatrix}

sdk/core/lib/math/color-matrix.js, line 198

Retuns a clone of the current matrix/

Returns:
Type Description
PhotoEditorSDK.Math.ColorMatrix

equals(matrix){Boolean}

sdk/core/lib/math/color-matrix.js, line 213

Checks if the values of the given matrix match this matrix's values.

Name Type Description
matrix PhotoEditorSDK.Math.ColorMatrix
Returns:
Type Description
Boolean

getOffsets(){Array.<Number>}

sdk/core/lib/math/color-matrix.js, line 240

Returns the offset values of this matrix

Returns:
Type Description
Array.<Number>

multiply(matrix){PhotoEditorSDK.Math.ColorMatrix}

sdk/core/lib/math/color-matrix.js, line 137

Multiplies the given matrix with this matrix.

Name Type Description
matrix PhotoEditorSDK.Math.ColorMatrix
Returns:
Type Description
PhotoEditorSDK.Math.ColorMatrix

reset(){ColorMatrix}

sdk/core/lib/math/color-matrix.js, line 93

Returns an identity color matrix.

Returns:
Type Description
ColorMatrix

set(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t){PhotoEditorSDK.Math.ColorMatrix}

sdk/core/lib/math/color-matrix.js, line 66

Sets the values of the color matrix.

Name Type Description
a number
b number
c number
d number
e number
f number
g number
h number
i number
j number
k number
l number
m number
n number
o number
p number
q number
r number
s number
t number
Returns:
Type Description
PhotoEditorSDK.Math.ColorMatrix

toArray(){Array.<Number>}

sdk/core/lib/math/color-matrix.js, line 264

Returns an array of numbers

Returns:
Type Description
Array.<Number>

toString(){String}

sdk/core/lib/math/color-matrix.js, line 253

Returns a string representation of this color matrix

Returns:
Type Description
String