SceneColorMatrixPrimitive Class

A primitive that gives each pixel of its input a new color from its own one: feColorMatrix of SVG, with the matrix of SceneColorMatrixFilter.

public sealed class SceneColorMatrixPrimitive : SceneFilterPrimitive
Inheritance
SceneFilterPrimitive SceneColorMatrixPrimitive

Constructors

NameDescription
SceneColorMatrixPrimitive(SceneColorMatrixFilter)Initializes a new instance of the SceneColorMatrixPrimitive class with the matrix of a filter, such as SceneColorMatrixFilter.Saturate.
SceneColorMatrixPrimitive(ReadOnlySpan<double>)Initializes a new instance of the SceneColorMatrixPrimitive class.

SceneColorMatrixPrimitive overloads

SceneColorMatrixPrimitive(SceneColorMatrixFilter)

SceneColorMatrixPrimitive.cs

Initializes a new instance of the SceneColorMatrixPrimitive class with the matrix of a filter, such as SceneColorMatrixFilter.Saturate.

public SceneColorMatrixPrimitive(SceneColorMatrixFilter matrix)
Parameters
matrix SceneColorMatrixFilter
The filter whose matrix is used.
Exceptions
ArgumentNullException
matrix is null.

SceneColorMatrixPrimitive(ReadOnlySpan<double>)

SceneColorMatrixPrimitive.cs

Initializes a new instance of the SceneColorMatrixPrimitive class.

public SceneColorMatrixPrimitive(params scoped ReadOnlySpan<double> values)
Parameters
values ReadOnlySpan<double>
The 20 values of the matrix, by row: values of type="matrix".
Exceptions
ArgumentException
values does not have 20 values, or one is not finite.

Properties

NameDescription
InputGets the input: in.
LuminanceToAlphaGets the matrix of luminanceToAlpha: the alpha becomes the luminance of the color, and the color black.
ValuesGets the 20 values of the matrix, by row.

Gets the input: in.

public SceneFilterInput Input { get; init; }

Property value

SceneFilterInput

Gets the matrix of luminanceToAlpha: the alpha becomes the luminance of the color, and the color black.

public static SceneColorMatrixPrimitive LuminanceToAlpha { get; }

Gets the 20 values of the matrix, by row.

public IReadOnlyList<double> Values { get; }

Property value

IReadOnlyList<double>