Class ColorMatrix

Class ColorMatrix

Namespace: Aspose.Imaging
Assembly: Aspose.Imaging.dll (25.7.0)

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

public sealed class ColorMatrix
   {
       private double[] _matrix;
       public double this[int row, int column]
       {
           get { return _matrix[row * 4 + column]; }
           set { _matrix[row * 4 + column] = value; }
       }
   }

Inheritance

object ColorMatrix

Inherited Members

object.GetType() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()

Constructors

ColorMatrix()

Initializes a new instance of the Aspose.Imaging.ColorMatrix class.

public ColorMatrix()
   {
   }

ColorMatrix(float[][])

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

public ColorMatrix(float[][] newColorMatrix)
{
    this.ColorMatrix = newColorMatrix;
}

Parameters

newColorMatrix float [][]

The values of the elements for the new Aspose.Imaging.ColorMatrix.

Fields

MatrixDimensionElementsCount

The number of elements in matrix dimension.

public const int MatrixDimensionElementsCount = 5;

Field Value

int

MatrixDimensionsCount

The number of matrix dimensions.

public const int MatrixDimensionsCount = 5;

Field Value

int

MatrixTotalElementsCount

The total number of elements in the matrix.

public const int MatrixTotalElementsCount = 25;

Field Value

int

Properties

Matrix00

Gets or sets the element at the 0 (zero) row and 0 column of this Aspose.Imaging.ColorMatrix.

public float Matrix00
   {
      get;
      set;
   }

Property Value

float

Matrix01

Gets or sets the element at the 0 (zero) row and first column of this Aspose.Imaging.ColorMatrix.

public float Matrix01
   {
      get;
      set;
   }

Property Value

float

Matrix02

Gets or sets the element at the 0 (zero) row and second column of this Aspose.Imaging.ColorMatrix.

public float Matrix02
   {
      get;
      set;
   }

Property Value

float

Matrix03

Gets or sets the element at the 0 (zero) row and third column of this Aspose.Imaging.ColorMatrix.

public float Matrix03
   {
      get;
      set;
   }

Property Value

float

Matrix04

Gets or sets the element at the 0 (zero) row and fourth column of this Aspose.Imaging.ColorMatrix.

public float Matrix04
   {
      get;
      set;
   }

Property Value

float

Matrix10

Gets or sets the element at the first row and 0 (zero) column of this Aspose.Imaging.ColorMatrix.

public float Matrix10
   {
      get;
      set;
   }

Property Value

float

Matrix11

Gets or sets the element at the first row and first column of this Aspose.Imaging.ColorMatrix.

public float Matrix11
   {
      get;
      set;
   }

Property Value

float

Matrix12

Gets or sets the element at the first row and second column of this Aspose.Imaging.ColorMatrix.

public float Matrix12
   {
      get;
      set;
   }

Property Value

float

Matrix13

Gets or sets the element at the first row and third column of this Aspose.Imaging.ColorMatrix.

public float Matrix13
   {
      get;
      set;
   }

Property Value

float

Matrix14

Gets or sets the element at the first row and fourth column of this Aspose.Imaging.ColorMatrix.

public float Matrix14
    {
        get;
        set;
    }

Property Value

float

Matrix20

Gets or sets the element at the second row and 0 (zero) column of this Aspose.Imaging.ColorMatrix.

public float Matrix20
   {
      get;
      set;
   }

Property Value

float

Matrix21

Gets or sets the element at the second row and first column of this Aspose.Imaging.ColorMatrix.

public float Matrix21
   {
      get;
      set;
   }

Property Value

float

Matrix22

Gets or sets the element at the second row and second column of this Aspose.Imaging.ColorMatrix.

public float Matrix22
   {
      get;
      set;
   }

Property Value

float

Matrix23

Gets or sets the element at the second row and third column of this Aspose.Imaging.ColorMatrix.

public float Matrix23
   {
      get;
      set;
   }

Property Value

float

Matrix24

Gets or sets the element at the second row and fourth column of this Aspose.Imaging.ColorMatrix.

public float Matrix24
   {
      get;
      set;
   }

Property Value

float

Matrix30

Gets or sets the element at the third row and 0 (zero) column of this Aspose.Imaging.ColorMatrix.

public float Matrix30
   {
      get;
      set;
   }

Property Value

float

Matrix31

Gets or sets the element at the third row and first column of this Aspose.Imaging.ColorMatrix.

public float Matrix31
   {
      get;
      set;
   }

Property Value

float

Matrix32

Gets or sets the element at the third row and second column of this Aspose.Imaging.ColorMatrix.

public float Matrix32
    {
        get;
        set;
    }

Property Value

float

Matrix33

Gets or sets the element at the third row and third column of this Aspose.Imaging.ColorMatrix.

public float Matrix33
   {
      get;
      set;
   }

Property Value

float

Matrix34

Gets or sets the element at the third row and fourth column of this Aspose.Imaging.ColorMatrix.

public float Matrix34
   {
      get;
      set;
   }

Property Value

float

Matrix40

Gets or sets the element at the fourth row and 0 (zero) column of this Aspose.Imaging.ColorMatrix.

public float Matrix40
   {
      get;
      set;
   }

Property Value

float

Matrix41

Gets or sets the element at the fourth row and first column of this Aspose.Imaging.ColorMatrix.

public float Matrix41
   {
      get;
      set;
   }

Property Value

float

Matrix42

Gets or sets the element at the fourth row and second column of this Aspose.Imaging.ColorMatrix.

public float Matrix42
   {
      get;
      set;
   }

Property Value

float

Matrix43

Gets or sets the element at the fourth row and third column of this Aspose.Imaging.ColorMatrix.

public float Matrix43
   {
      get;
      set;
   }

Property Value

float

Matrix44

Gets or sets the element at the fourth row and fourth column of this Aspose.Imaging.ColorMatrix.

public float Matrix44
   {
      get;
      set;
   }

Property Value

float

this[int, int]

Gets or sets the element at the specified row and column in the Aspose.Imaging.ColorMatrix.

public float this[int row, int column] { get; set; }
   public float this_Indexer(int row, int column)
   {
       get;
       set;
   }

Property Value

float

Methods

GetMatrix()

Gets the matrix values.

public float[][] GetMatrix()
{
}
In this case, since there's no existing indentation or spacing to follow, I will use standard C# conventions for a simple method:
public float[][] GetMatrix()
{
}

Returns

float [][]

The matrix values array.

 English