SceneDisplacementMapPrimitive Class

A primitive that moves the pixels of its input by the colors of a map: feDisplacementMap of SVG.

public sealed class SceneDisplacementMapPrimitive : SceneFilterPrimitive

Remarks

A pixel (x, y) of the result is the pixel of the input at (x + scale (X - 1/2), y + scale (Y - 1/2)), with X and Y the components of the pixel of the map that SceneDisplacementMapPrimitive.XChannel and SceneDisplacementMapPrimitive.YChannel select.

Inheritance
SceneFilterPrimitive SceneDisplacementMapPrimitive

Constructors

NameDescription
SceneDisplacementMapPrimitive(double, SceneFilterInput)Initializes a new instance of the SceneDisplacementMapPrimitive class.

SceneDisplacementMapPrimitive(double, SceneFilterInput)

SceneDisplacementMapPrimitive.cs

Initializes a new instance of the SceneDisplacementMapPrimitive class.

public SceneDisplacementMapPrimitive(double scale, SceneFilterInput map)

Parameters

scale double
How far a component of 0 or 1 moves a pixel, twice: scale.
map SceneFilterInput
The map: in2.

Exceptions

ArgumentException
scale is not a finite number.

Properties

NameDescription
InputGets the input: in.
MapGets the map: in2.
ScaleGets how far a component of 0 or 1 moves a pixel, twice.
XChannelGets the component of the map that moves the pixels along x: xChannelSelector. The default is SceneColorChannel.Alpha, as in SVG.
YChannelGets the component of the map that moves the pixels along y: yChannelSelector. The default is SceneColorChannel.Alpha, as in SVG.

Gets the input: in.

public SceneFilterInput Input { get; init; }

Property value

SceneFilterInput

Gets the map: in2.

public SceneFilterInput Map { get; }

Property value

SceneFilterInput

Gets how far a component of 0 or 1 moves a pixel, twice.

public double Scale { get; }

Property value

double

Gets the component of the map that moves the pixels along x: xChannelSelector. The default is SceneColorChannel.Alpha, as in SVG.

public SceneColorChannel XChannel { get; init; }

Property value

SceneColorChannel

Exceptions

ArgumentOutOfRangeException
The value is not a defined SceneColorChannel.

Gets the component of the map that moves the pixels along y: yChannelSelector. The default is SceneColorChannel.Alpha, as in SVG.

public SceneColorChannel YChannel { get; init; }

Property value

SceneColorChannel

Exceptions

ArgumentOutOfRangeException
The value is not a defined SceneColorChannel.