ColorMatrix Class

Summary: Defines a 5 x 5 matrix that contains the coordinates for the RGBA space. Several methods of the ImageAttributes class adjust image colors by using a color matrix. This class cannot be inherited.

Module: aspose.imaging

Full Name: aspose.imaging.ColorMatrix

Aspose.Imaging Version: 24.6.0

Constructors

NameDescription
ColorMatrix()Initializes a new instance of the ColorMatrix class.
ColorMatrix(new_color_matrix)Initializes a new instance of the ColorMatrix class using the elements in the specified matrix newColorMatrix.

Properties

NameTypeAccessDescription
MATRIX_DIMENSIONS_COUNT [static]intrThe number of matrix dimensions.
MATRIX_DIMENSION_ELEMENTS_COUNT [static]intrThe number of elements in matrix dimension.
MATRIX_TOTAL_ELEMENTS_COUNT [static]intrThe total number of elements in the matrix.
matrix00floatr/wGets or sets the element at the 0 (zero) row and 0 column of this ColorMatrix.
matrix01floatr/wGets or sets the element at the 0 (zero) row and first column of this ColorMatrix.
matrix02floatr/wGets or sets the element at the 0 (zero) row and second column of this ColorMatrix.
matrix03floatr/wGets or sets the element at the 0 (zero) row and third column of this ColorMatrix.
matrix04floatr/wGets or sets the element at the 0 (zero) row and fourth column of this ColorMatrix.
matrix10floatr/wGets or sets the element at the first row and 0 (zero) column of this ColorMatrix.
matrix11floatr/wGets or sets the element at the first row and first column of this ColorMatrix.
matrix12floatr/wGets or sets the element at the first row and second column of this ColorMatrix.
matrix13floatr/wGets or sets the element at the first row and third column of this ColorMatrix.
matrix14floatr/wGets or sets the element at the first row and fourth column of this ColorMatrix.
matrix20floatr/wGets or sets the element at the second row and 0 (zero) column of this ColorMatrix.
matrix21floatr/wGets or sets the element at the second row and first column of this ColorMatrix.
matrix22floatr/wGets or sets the element at the second row and second column of this ColorMatrix.
matrix23floatr/wGets or sets the element at the second row and third column of this ColorMatrix.
matrix24floatr/wGets or sets the element at the second row and fourth column of this ColorMatrix.
matrix30floatr/wGets or sets the element at the third row and 0 (zero) column of this ColorMatrix.
matrix31floatr/wGets or sets the element at the third row and first column of this ColorMatrix.
matrix32floatr/wGets or sets the element at the third row and second column of this ColorMatrix.
matrix33floatr/wGets or sets the element at the third row and third column of this ColorMatrix.
matrix34floatr/wGets or sets the element at the third row and fourth column of this ColorMatrix.
matrix40floatr/wGets or sets the element at the fourth row and 0 (zero) column of this ColorMatrix.
matrix41floatr/wGets or sets the element at the fourth row and first column of this ColorMatrix.
matrix42floatr/wGets or sets the element at the fourth row and second column of this ColorMatrix.
matrix43floatr/wGets or sets the element at the fourth row and third column of this ColorMatrix.
matrix44floatr/wGets or sets the element at the fourth row and fourth column of this ColorMatrix.

Methods

NameDescription
get(row, column)Gets the element at the specified row and column in the ColorMatrix.
get_matrix()Gets the matrix values.
set(row, column, value)Sets the element at the specified row and column in the ColorMatrix.

Constructor: ColorMatrix()

 ColorMatrix() 

Initializes a new instance of the ColorMatrix class.

Constructor: ColorMatrix(new_color_matrix)

 ColorMatrix(new_color_matrix) 

Initializes a new instance of the ColorMatrix class using the elements in the specified matrix newColorMatrix.

Parameters:

ParameterTypeDescription
new_color_matrixfloat[]The values of the elements for the new ColorMatrix.

Method: get(row, column)

 get(row, column) 

Gets the element at the specified row and column in the ColorMatrix.

Parameters:

ParameterTypeDescription
rowintThe row number.
columnintThe column number.

Returns

TypeDescription
floatThe element at the specified row and column.

Method: get_matrix()

 get_matrix() 

Gets the matrix values.

Returns

TypeDescription
float[]The matrix values array.

Method: set(row, column, value)

 set(row, column, value) 

Sets the element at the specified row and column in the ColorMatrix.

Parameters:

ParameterTypeDescription
rowintThe row number.
columnintThe column number.
valuefloatThe element at the specified row and column.