SceneClipPath Class

A clipping path made of shapes and texts (SceneElement.ClippingPath), as the clipPath of SVG: the element is drawn only inside the union of the shapes of its content.

public sealed class SceneClipPath

Remarks

Each element of the content adds its geometry, whatever its paints: a rectangle, a circle or a path its interior, by its fill rule (ScenePath.FillRule, the clip-rule of SVG); a text its glyphs; a use the geometry of its content; a group the geometry of its children, with its transform. A line and an image add nothing. The SceneElement.ClippingPath of a shape or a text of the content cuts its geometry. The other properties of the content (strokes, markers, opacities, filters, masks, the clips and the view boxes of the groups, the clipping paths of the groups and of the uses) do not apply.

The content is in the coordinates of the parent of the clipped element, as the masks and the clips of the groups.

Constructors

NameDescription
SceneClipPath()

SceneClipPath()

SceneClipPath.cs
public SceneClipPath()

No documentation is available.

Properties

NameDescription
ClippingPathGets or sets a clipping path that cuts this one, or null: the element is drawn inside both, as an SVG clipPath that has a clip-path. A clipping path that cuts itself leaves nothing visible.
ContentGets the shapes and texts of the clipping path, in the coordinates of the parent of the clipped element.

ClippingPath

SceneClipPath.cs

Gets or sets a clipping path that cuts this one, or null: the element is drawn inside both, as an SVG clipPath that has a clip-path. A clipping path that cuts itself leaves nothing visible.

public SceneClipPath? ClippingPath { get; set; }

Property value

SceneClipPath?

Gets the shapes and texts of the clipping path, in the coordinates of the parent of the clipped element.

public SceneGroup Content { get; }

Property value

SceneGroup

Methods

NameDescription
GetBounds(Func<SceneText, SceneBounds?>)Gets a rectangle that contains the geometry of the clipping path, cut by the clipping paths that cut it, in the coordinates of its content, or null when it leaves nothing visible.

GetBounds(Func<SceneText, SceneBounds?>)

SceneClipPath.cs

Gets a rectangle that contains the geometry of the clipping path, cut by the clipping paths that cut it, in the coordinates of its content, or null when it leaves nothing visible.

public SceneBounds? GetBounds(Func<SceneText, SceneBounds?> measureText)

Parameters

measureText Func<SceneText, SceneBounds?>
Gives the rectangle of a text before its rotation, in the coordinates of its parent, or null when it draws nothing, as for SceneElement.GetBounds.

Returns

SceneBounds? The rectangle, or null.

Remarks

The rectangle of a shape is its interior, without its stroke; the other properties of the content that do not change its geometry (opacities, the clips and the view boxes of the groups) do not apply.