Struct OutlineSegment
One piece of a GlyphContour: a line or a Bézier curve from the previous segment's end to End.
public readonly record struct OutlineSegment : IEquatable<OutlineSegment>
- Implements
- Inherited Members
Constructors
OutlineSegment(OutlineSegmentKind, Vector2, Vector2, Vector2)
One piece of a GlyphContour: a line or a Bézier curve from the previous segment's end to End.
public OutlineSegment(OutlineSegmentKind Kind, Vector2 Control1, Vector2 Control2, Vector2 End)
Parameters
KindOutlineSegmentKindThe kind of curve.
Control1Vector2The control point of a quadratic, or the first of a cubic; unused for a line.
Control2Vector2The second control point of a cubic; unused otherwise.
EndVector2Where the segment ends, in EM units.
Properties
Control1
The control point of a quadratic, or the first of a cubic; unused for a line.
public Vector2 Control1 { get; init; }
Property Value
Control2
The second control point of a cubic; unused otherwise.
public Vector2 Control2 { get; init; }
Property Value
End
Where the segment ends, in EM units.
public Vector2 End { get; init; }
Property Value
Kind
The kind of curve.
public OutlineSegmentKind Kind { get; init; }
Property Value
Methods
Cubic(Vector2, Vector2, Vector2)
A cubic Bézier through control1 and control2 to end.
public static OutlineSegment Cubic(Vector2 control1, Vector2 control2, Vector2 end)
Parameters
Returns
Line(Vector2)
A straight line to end.
public static OutlineSegment Line(Vector2 end)
Parameters
endVector2
Returns
Quadratic(Vector2, Vector2)
A quadratic Bézier through control to end.
public static OutlineSegment Quadratic(Vector2 control, Vector2 end)