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 LineMarkerRemarks
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
| Name | Description |
|---|---|
| LineMarker(VectorPath, double) | Initializes a new instance of the LineMarker class. |
LineMarker(VectorPath, double)
LineMarker.csInitializes a new instance of the LineMarker class.
public LineMarker(VectorPath shape, double inset = 0d)Parameters
shapeVectorPath- 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.
insetdouble- The length the stroke is shortened by at that end, in units of the width of the pen. Must be zero or positive.
Exceptions
ArgumentNullExceptionshapeisnull.ArgumentExceptioninsetis not a finite number.ArgumentOutOfRangeExceptioninsetis negative or exceeds 16777216.
Properties
| Name | Description |
|---|---|
| Arrow | 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. |
| Circle | Gets a disk of three widths across, centered on the end of the contour. |
| Diamond | 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. |
| Inset | Gets the length the stroke is shortened by at the end of the contour, in units of the width of the pen. |
| Shape | Gets the shape, in units of the width of the pen. |
| Square | Gets a square of three widths, centered on the end of the contour, with two sides along the direction of the contour. |
Arrow
LineMarker.csGets 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
Circle
LineMarker.csGets a disk of three widths across, centered on the end of the contour.
public static LineMarker Circle { get; }Property value
Diamond
LineMarker.csGets 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
Inset
LineMarker.csShape
LineMarker.csSquare
LineMarker.csGets 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; }