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
SceneFilterPrimitiveSceneColorMatrixPrimitive
Constructors
| Name | Description |
|---|---|
| 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.csInitializes a new instance of the SceneColorMatrixPrimitive class with the matrix of a filter, such as SceneColorMatrixFilter.Saturate.
public SceneColorMatrixPrimitive(SceneColorMatrixFilter matrix)Parameters
matrixSceneColorMatrixFilter- The filter whose matrix is used.
Exceptions
ArgumentNullExceptionmatrixisnull.
SceneColorMatrixPrimitive(ReadOnlySpan<double>)
SceneColorMatrixPrimitive.csInitializes a new instance of the SceneColorMatrixPrimitive class.
public SceneColorMatrixPrimitive(params scoped ReadOnlySpan<double> values)Parameters
valuesReadOnlySpan<double>- The 20 values of the matrix, by row:
valuesoftype="matrix".
Exceptions
ArgumentExceptionvaluesdoes not have 20 values, or one is not finite.
Properties
| Name | Description |
|---|---|
| Input | Gets the input: in. |
| LuminanceToAlpha | Gets the matrix of luminanceToAlpha: the alpha becomes the luminance of the color, and the color black. |
| Values | Gets the 20 values of the matrix, by row. |
LuminanceToAlpha
SceneColorMatrixPrimitive.csGets the matrix of luminanceToAlpha: the alpha becomes the luminance of the color, and the color black.
public static SceneColorMatrixPrimitive LuminanceToAlpha { get; }