SceneFilterGraph Class
A filter made of primitives that read the drawing of the element, its alpha, and each other's results, as an SVG filter element whose units are the user space.
public sealed class SceneFilterGraph : SceneFilterRemarks
The primitives are computed in order. Each one reads its inputs (SceneFilterInput: by default the result of the primitive before it, or the drawing of the element for the first one) and computes its result in its subregion, transparent outside it. The result of the last primitive is drawn, and nothing is drawn outside the region of the filter.
The region, the subregions, and the lengths and positions of the primitives are in the coordinates of the parent of the element, as the other filters, the masks and the clips of the groups: outside the transform of the element. The SVG and image renderers draw the graphs; the PDF renderer throws NotSupportedException for a scene that has one.
- Inheritance
SceneFilterSceneFilterGraph
Constructors
| Name | Description |
|---|---|
| SceneFilterGraph(IEnumerable<SceneFilterPrimitive>) | Initializes a new instance of the SceneFilterGraph class. |
SceneFilterGraph(IEnumerable<SceneFilterPrimitive>)
SceneFilterGraph.csInitializes a new instance of the SceneFilterGraph class.
public SceneFilterGraph(IEnumerable<SceneFilterPrimitive> primitives)Parameters
primitivesIEnumerable<SceneFilterPrimitive>- The primitives, in the order they are computed. They are copied.
Exceptions
ArgumentNullExceptionprimitivesisnull.ArgumentException- There is no primitive, a primitive is
null, or a primitive reads the result of a primitive that is not before it.
Properties
| Name | Description |
|---|---|
| Primitives | Gets the primitives, in the order they are computed. |
| Region | Gets the rectangle the filter draws in (the filter region of SVG), in the coordinates of the parent of the element, or null (the default) for the bounds of what the element draws, enlarged by how far the primitives move it (SceneFilterGraph.GetRegion). |
Primitives
SceneFilterGraph.csGets the primitives, in the order they are computed.
public IReadOnlyList<SceneFilterPrimitive> Primitives { get; }Property value
Region
SceneFilterGraph.csGets the rectangle the filter draws in (the filter region of SVG), in the coordinates of the parent of the element, or null (the default) for the bounds of what the element draws, enlarged by how far the primitives move it (SceneFilterGraph.GetRegion).
public SceneBounds? Region { get; init; }Property value
Exceptions
ArgumentException- A coordinate is not a finite number.
ArgumentOutOfRangeException- The width or the height is negative.
Methods
| Name | Description |
|---|---|
| GetRegion(SceneBounds) | Gets the rectangle the filter draws in, for an element whose drawing has given bounds. |
GetRegion(SceneBounds)
SceneFilterGraph.csGets the rectangle the filter draws in, for an element whose drawing has given bounds.
public SceneBounds GetRegion(SceneBounds bounds)Parameters
boundsSceneBounds- The bounds of what the element draws without the filter, in the coordinates of its parent.
Returns
SceneBounds SceneFilterGraph.Region when it is set; otherwise bounds enlarged on each side by the sum of how far each primitive moves what it reads: 3 standard deviations for a blur, the offset of an offset or of a shadow, the radius of a morphology, half the scale of a displacement map, the size of a convolution matrix, 1 for a lighting.