SceneShape Class

An element that is filled or stroked.

public abstract class SceneShape : SceneElement
Inheritance
SceneElement SceneShape

Properties

NameDescription
FillGets or sets how the interior is painted, or null to leave it empty.
LineCapGets or sets the shape of the ends of open outlines.
LineJoinGets or sets the shape of the corners of outlines.
MiterLimitGets or sets the limit of SceneLineJoin.Miter joins: the largest allowed ratio between the length of the miter and the width of the outline. A sharper corner is beveled. The default is 4, as in SVG; a value less than 1 or not finite is 4.
NonScalingStrokeGets or sets a value that indicates whether the stroke keeps its width whatever the transforms of the shape and of its groups, as the SVG vector-effect="non-scaling-stroke". The default is false.
PaintOrderGets or sets the order in which the fill, the stroke and the markers are painted, as the SVG paint-order property. The default is the fill, then the stroke, then the markers.
StrokeGets or sets how the outline is painted, or null for no outline.
StrokeDashArrayGets or sets the lengths of the dashes and gaps of the outline, or null for a solid outline.
StrokeDashOffsetGets or sets the distance into SceneShape.StrokeDashArray at which the dashes of the outline start. A negative distance starts before the pattern, and a value that is not finite is 0.
StrokeWidthGets or sets the width of the outline.

Gets or sets how the interior is painted, or null to leave it empty.

public ScenePaint? Fill { get; set; }

Property value

ScenePaint?

Gets or sets the shape of the ends of open outlines.

public SceneLineCap LineCap { get; set; }

Property value

SceneLineCap

Gets or sets the shape of the corners of outlines.

public SceneLineJoin LineJoin { get; set; }

Property value

SceneLineJoin

MiterLimit

SceneShape.cs

Gets or sets the limit of SceneLineJoin.Miter joins: the largest allowed ratio between the length of the miter and the width of the outline. A sharper corner is beveled. The default is 4, as in SVG; a value less than 1 or not finite is 4.

public double MiterLimit { get; set; }

Property value

double

NonScalingStroke

SceneShape.cs

Gets or sets a value that indicates whether the stroke keeps its width whatever the transforms of the shape and of its groups, as the SVG vector-effect="non-scaling-stroke". The default is false.

public bool NonScalingStroke { get; set; }

Property value

bool

Remarks

The width and the dashes of the stroke are then in the coordinates of the scene: a stroke 1 pixel wide stays 1 pixel wide in a group scaled 10 times. The image and PDF renderers scale it with the scene, as the rest of the drawing. The bounds of the shape (SceneElement.GetBounds) count its width in the coordinates of the shape.

PaintOrder

SceneShape.cs

Gets or sets the order in which the fill, the stroke and the markers are painted, as the SVG paint-order property. The default is the fill, then the stroke, then the markers.

public ScenePaintOrder PaintOrder { get; set; }

Property value

ScenePaintOrder

Gets or sets how the outline is painted, or null for no outline.

public ScenePaint? Stroke { get; set; }

Property value

ScenePaint?

StrokeDashArray

SceneShape.cs

Gets or sets the lengths of the dashes and gaps of the outline, or null for a solid outline.

public IReadOnlyList<double>? StrokeDashArray { get; set; }

StrokeDashOffset

SceneShape.cs

Gets or sets the distance into SceneShape.StrokeDashArray at which the dashes of the outline start. A negative distance starts before the pattern, and a value that is not finite is 0.

public double StrokeDashOffset { get; set; }

Property value

double

StrokeWidth

SceneShape.cs

Gets or sets the width of the outline.

public double StrokeWidth { get; set; }

Property value

double