PathSegment Struct
An element of a VectorPath, as VectorPath.EnumerateSegments gives it: the start of a contour, a straight segment, a Bézier curve, an arc of an ellipse, or the end of a closed contour.
public readonly struct PathSegment : IEquatable<PathSegment>Remarks
Each kind is what the method of the same name of VectorPathBuilder adds, with the same values: a path can be built again from its segments.
- Implements
Properties
| Name | Description |
|---|---|
| Control1 | Gets the control point of a quadratic Bézier curve, or the first control point of a cubic one. |
| Control2 | Gets the second control point of a cubic Bézier curve. |
| IsClockwise | Gets a value indicating whether an arc turns clockwise on the image. |
| IsLargeArc | Gets a value indicating whether an arc is more than half a turn. |
| Kind | Gets what the segment adds to the path. |
| Point | Gets the point the segment ends at: the first point of the contour for PathSegmentKind.MoveTo and for PathSegmentKind.Close. |
| RadiusX | Gets the first radius of the ellipse of an arc. |
| RadiusY | Gets the second radius of the ellipse of an arc. |
| Rotation | Gets the angle of the first radius of the ellipse of an arc, in degrees from the x axis, clockwise on the image. |
Control1
PathSegment.csControl2
PathSegment.csIsClockwise
PathSegment.csIsLargeArc
PathSegment.csKind
PathSegment.csPoint
PathSegment.csGets the point the segment ends at: the first point of the contour for PathSegmentKind.MoveTo and for PathSegmentKind.Close.
public PointD Point { get; }Property value
RadiusX
PathSegment.csRadiusY
PathSegment.csRotation
PathSegment.csMethods
| Name | Description |
|---|---|
| Equals(PathSegment) | Indicates whether the current object is equal to another object of the same type. |
| Equals(object?) | Indicates whether this instance and a specified object are equal. |
| GetHashCode() | Returns the hash code for this instance. |
| ToString() | Returns the segment as a command of SVG path data, with absolute coordinates. |
Equals overloads
Equals(PathSegment)
PathSegment.csIndicates whether the current object is equal to another object of the same type.
public bool Equals(PathSegment other)Parameters
otherPathSegment- An object to compare with this object.
Returns
bool true if the current object is equal to the other parameter; otherwise, false.
Equals(object?)
PathSegment.csGetHashCode()
PathSegment.csToString()
PathSegment.csOperators
| Name | Description |
|---|---|
| operator ==(PathSegment, PathSegment) | Compares two segments for equality. |
| operator !=(PathSegment, PathSegment) | Compares two segments for inequality. |
operator ==(PathSegment, PathSegment)
PathSegment.csCompares two segments for equality.
public static bool operator ==(PathSegment left, PathSegment right)Parameters
leftPathSegment- The first segment.
rightPathSegment- The second segment.
Returns
bool true if every value is equal; otherwise false.
operator !=(PathSegment, PathSegment)
PathSegment.csCompares two segments for inequality.
public static bool operator !=(PathSegment left, PathSegment right)Parameters
leftPathSegment- The first segment.
rightPathSegment- The second segment.
Returns
bool true if a value differs; otherwise false.