LineMarker Class

A shape drawn at an end of the open contours a pen strokes: the head of an arrow, a dot, a square.

public sealed class LineMarker

Remarks

Placement. The shape is given in units of the width of the pen, around the end of the contour: its origin is that end, and its positive x axis points the way the contour leaves it (away from the path, at both ends). It is scaled by the width of the pen, turned to the direction of the contour at that end, and filled with the brush of the pen together with the stroke: where it overlaps the stroke, a translucent paint is not painted twice.

Shape. A marker is the union of the contours of its shape, whichever way they turn: a contour inside another one does not make a hole. Open contours are closed by a straight segment.

Inset. The stroke stops LineMarker.Inset times the width of the pen before the end of the contour, so that it does not show beyond a marker that narrows to a point: the tip of LineMarker.Arrow is exactly at the end of the path. A contour that is not longer than its insets is drawn by its markers alone.

Markers are immutable and thread-safe.

Constructors

NameDescription
LineMarker(VectorPath, double)Initializes a new instance of the LineMarker class.

LineMarker(VectorPath, double)

LineMarker.cs

Initializes a new instance of the LineMarker class.

public LineMarker(VectorPath shape, double inset = 0d)

Parameters

shape VectorPath
The shape, in units of the width of the pen: its origin is the end of the contour, and its positive x axis the direction the contour leaves it by.
inset double
The length the stroke is shortened by at that end, in units of the width of the pen. Must be zero or positive.

Exceptions

ArgumentNullException
shape is null.
ArgumentException
inset is not a finite number.
ArgumentOutOfRangeException
inset is negative or exceeds 16777216.

Properties

NameDescription
ArrowGets the head of an arrow: a triangle five widths long and four widths wide, whose tip is the end of the contour. The stroke stops two widths before the tip.
CircleGets a disk of three widths across, centered on the end of the contour.
DiamondGets a square of four widths across its corners, centered on the end of the contour, with a corner in the direction of the contour.
InsetGets the length the stroke is shortened by at the end of the contour, in units of the width of the pen.
ShapeGets the shape, in units of the width of the pen.
SquareGets a square of three widths, centered on the end of the contour, with two sides along the direction of the contour.

Gets the head of an arrow: a triangle five widths long and four widths wide, whose tip is the end of the contour. The stroke stops two widths before the tip.

public static LineMarker Arrow { get; }

Property value

LineMarker

Gets a disk of three widths across, centered on the end of the contour.

public static LineMarker Circle { get; }

Property value

LineMarker

Gets a square of four widths across its corners, centered on the end of the contour, with a corner in the direction of the contour.

public static LineMarker Diamond { get; }

Property value

LineMarker

Gets the length the stroke is shortened by at the end of the contour, in units of the width of the pen.

public double Inset { get; }

Property value

double

Gets the shape, in units of the width of the pen.

public VectorPath Shape { get; }

Property value

VectorPath

Gets a square of three widths, centered on the end of the contour, with two sides along the direction of the contour.

public static LineMarker Square { get; }

Property value

LineMarker