ColorMatrixPrimitive Class

A primitive that applies a color matrix to its input: feColorMatrix of SVG.

public sealed class ColorMatrixPrimitive : FilterPrimitive

Remarks

The matrix is applied as by ColorMatrixFilter, to the straight colors of each pixel. The types of feColorMatrix are ready-made matrices: saturate is ColorMatrix.CreateSaturation, hueRotate is ColorMatrix.CreateHueRotation, and luminanceToAlpha is ColorMatrix.LuminanceToAlpha.

Inheritance
FilterPrimitive ColorMatrixPrimitive

Constructors

NameDescription
ColorMatrixPrimitive(ColorMatrix)Initializes a new instance of the ColorMatrixPrimitive class.

ColorMatrixPrimitive(ColorMatrix)

ColorMatrixPrimitive.cs

Initializes a new instance of the ColorMatrixPrimitive class.

public ColorMatrixPrimitive(ColorMatrix matrix)

Parameters

matrix ColorMatrix
The matrix.

Exceptions

ArgumentNullException
matrix is null.

Properties

NameDescription
InputGets the input: in.
MatrixGets the matrix.

Gets the input: in.

public FilterInput Input { get; init; }

Property value

FilterInput

Gets the matrix.

public ColorMatrix Matrix { get; }

Property value

ColorMatrix