Class DrawingPath
- Namespace
- Forma
- Assembly
- Forma.dll
Backend-neutral path data consumed by Forma drawing and hit-test pipelines.
public sealed class DrawingPath
- Inheritance
-
DrawingPath
- Inherited Members
Constructors
DrawingPath()
public DrawingPath()
Properties
Commands
The immutable-in-order command stream recorded for this path.
public IReadOnlyList<DrawingPathCommand> Commands { get; }
Property Value
IsFrozen
public bool IsFrozen { get; }
Property Value
Methods
ArcTo(Vector2, float, bool, bool, Vector2)
public DrawingPath ArcTo(Vector2 radius, float rotationDegrees, bool isLargeArc, bool sweepClockwise, Vector2 end)
Parameters
Returns
ArcToRelative(Vector2, float, bool, bool, Vector2)
public DrawingPath ArcToRelative(Vector2 radius, float rotationDegrees, bool isLargeArc, bool sweepClockwise, Vector2 end)
Parameters
Returns
Close()
Closes the current contour.
public DrawingPath Close()
Returns
ContainsPoint(Vector2, Matrix, FillRule, float)
Tests a point against transformed geometry using the selected winding rule.
public bool ContainsPoint(Vector2 point, Matrix transform, FillRule fillRule, float tolerance = 0.25)
Parameters
Returns
ContainsPoint(Vector2, Matrix, float)
Tests a point against the transformed nonzero-winding fill geometry.
public bool ContainsPoint(Vector2 point, Matrix transform, float tolerance = 0.25)
Parameters
pointVector2transformMatrixtolerancefloat
Returns
CubicTo(Vector2, Vector2, Vector2)
Adds a cubic Bezier segment.
public DrawingPath CubicTo(Vector2 control1, Vector2 control2, Vector2 end)
Parameters
control1Vector2control2Vector2endVector2
Returns
CubicToRelative(Vector2, Vector2, Vector2)
public DrawingPath CubicToRelative(Vector2 control1, Vector2 control2, Vector2 end)
Parameters
control1Vector2control2Vector2endVector2
Returns
Freeze()
public void Freeze()
HorizontalTo(float)
public DrawingPath HorizontalTo(float x)
Parameters
xfloat
Returns
HorizontalToRelative(float)
public DrawingPath HorizontalToRelative(float offset)
Parameters
offsetfloat
Returns
LineTo(Vector2)
Adds a straight segment to the supplied point.
public DrawingPath LineTo(Vector2 point)
Parameters
pointVector2
Returns
LineToRelative(Vector2)
public DrawingPath LineToRelative(Vector2 offset)
Parameters
offsetVector2
Returns
MoveTo(Vector2)
Begins a contour at the supplied point.
public DrawingPath MoveTo(Vector2 point)
Parameters
pointVector2
Returns
MoveToRelative(Vector2)
public DrawingPath MoveToRelative(Vector2 offset)
Parameters
offsetVector2
Returns
Parse(string)
public static DrawingPath Parse(string data)
Parameters
datastring
Returns
QuadraticTo(Vector2, Vector2)
public DrawingPath QuadraticTo(Vector2 control, Vector2 end)
Parameters
controlVector2endVector2
Returns
QuadraticToRelative(Vector2, Vector2)
public DrawingPath QuadraticToRelative(Vector2 control, Vector2 end)
Parameters
controlVector2endVector2
Returns
SmoothCubicTo(Vector2, Vector2)
public DrawingPath SmoothCubicTo(Vector2 control2, Vector2 end)
Parameters
control2Vector2endVector2
Returns
SmoothCubicToRelative(Vector2, Vector2)
public DrawingPath SmoothCubicToRelative(Vector2 control2, Vector2 end)
Parameters
control2Vector2endVector2
Returns
SmoothQuadraticTo(Vector2)
public DrawingPath SmoothQuadraticTo(Vector2 end)
Parameters
endVector2
Returns
SmoothQuadraticToRelative(Vector2)
public DrawingPath SmoothQuadraticToRelative(Vector2 end)
Parameters
endVector2
Returns
VerticalTo(float)
public DrawingPath VerticalTo(float y)
Parameters
yfloat
Returns
VerticalToRelative(float)
public DrawingPath VerticalToRelative(float offset)
Parameters
offsetfloat