public sealed class PathShape : Shape
Represents a collection of potentially non-consecutive segments.

Properties

ArcCount

#
public int ArcCount { get; }
Gets the total number of arc segments.

BezierCount

#
public int BezierCount { get; }
Gets the total number of bezier segments.

Bounds

#
public override Box Bounds { get; }
Gets the bounding box for this shape.
Shape.Bounds

Empty

#
public static PathShape Empty { get; }
Gets the empty path with zero width.

IsClosed

#
public bool IsClosed { get; }
Gets whether this path is closed. Paths that are nearly closed are also considered truly closed.

LineCount

#
public int LineCount { get; }
Gets the total number of line segments.

SegmentCount

#
public int SegmentCount { get; }
Gets the total number of segments.

Width

#
public float Width { get; }
Gets the width of this path.

Methods

AddSegment

#
public PathShape AddSegment(ArcF arc)
Add an arc segment to this path.
arc (ArcF)Arc segment to add.
Extended path.

AddSegment

#
public PathShape AddSegment(BezierF bezier)
Add a bezier segment to this path.
bezier (BezierF)Line segment to add.
Extended path.

AddSegment

#
public PathShape AddSegment(CircleF circle)
Add a circle segment to this path.
circle (CircleF)Circle segment to add.
Extended path.

AddSegment

#
public PathShape AddSegment(LineF line)
Add a line segment to this path.
line (LineF)Line segment to add.
Extended path.

Close

#
public PathShape Close()
Close this path with a linear segment.
Closed path, or empty path if this path is empty.

CreateEmpty

#
public static PathShape CreateEmpty(float width)
Create an empty path shape with a specific width.
width (float)Width of path.
None path.

CreateFromSegments

#
public static PathShape CreateFromSegments(float width, params object[] segments)
Create a path from individual segments.
width (float)Path width.
segments (params object[])Array of segments. May only contain LineF, ArcsF and BezierF instances.
Path made up of all segments.

IsCoincident

#
public override bool IsCoincident(double x, double y)
Test whether a specific coordinate is coincident with this obstacle.
x (double)
y (double)
True if point is coincident.

ModifyWidth

#
public PathShape ModifyWidth(float width)
Modify the width of this shape.
width (float)New width.
Modified path.

Overlap

#
public override Overlap Overlap(Box box)
Determine the overlap between this shape and a box.
box (Box)Box.
Overlap topology.
Shape.Overlap

SegmentEnd

#
public PointF SegmentEnd(int index)
Gets the end point of the segment at the given index.
index (int)Tier index.
End point of segment.

SegmentStart

#
public PointF SegmentStart(int index)
Gets the start point of the segment at the given index.
index (int)Tier index.
Start point of segment.