SceneDisplacementMapPrimitive Class
A primitive that moves the pixels of its input by the colors of a map: feDisplacementMap of SVG.
public sealed class SceneDisplacementMapPrimitive : SceneFilterPrimitiveRemarks
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
SceneFilterPrimitiveSceneDisplacementMapPrimitive
Constructors
| Name | Description |
|---|---|
| SceneDisplacementMapPrimitive(double, SceneFilterInput) | Initializes a new instance of the SceneDisplacementMapPrimitive class. |
SceneDisplacementMapPrimitive(double, SceneFilterInput)
SceneDisplacementMapPrimitive.csInitializes a new instance of the SceneDisplacementMapPrimitive class.
public SceneDisplacementMapPrimitive(double scale, SceneFilterInput map)Parameters
scaledouble- How far a component of 0 or 1 moves a pixel, twice:
scale. mapSceneFilterInput- The map:
in2.
Exceptions
ArgumentExceptionscaleis not a finite number.
Properties
| Name | Description |
|---|---|
| Input | Gets the input: in. |
| Map | Gets the map: in2. |
| Scale | Gets how far a component of 0 or 1 moves a pixel, twice. |
| XChannel | Gets the component of the map that moves the pixels along x: xChannelSelector. The default is SceneColorChannel.Alpha, as in SVG. |
| YChannel | Gets the component of the map that moves the pixels along y: yChannelSelector. The default is SceneColorChannel.Alpha, as in SVG. |
XChannel
SceneDisplacementMapPrimitive.csGets 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; }YChannel
SceneDisplacementMapPrimitive.csGets 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; }