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

IReadOnlyList<DrawingPathCommand>

IsFrozen

public bool IsFrozen { get; }

Property Value

bool

Methods

ArcTo(Vector2, float, bool, bool, Vector2)

public DrawingPath ArcTo(Vector2 radius, float rotationDegrees, bool isLargeArc, bool sweepClockwise, Vector2 end)

Parameters

radius Vector2
rotationDegrees float
isLargeArc bool
sweepClockwise bool
end Vector2

Returns

DrawingPath

ArcToRelative(Vector2, float, bool, bool, Vector2)

public DrawingPath ArcToRelative(Vector2 radius, float rotationDegrees, bool isLargeArc, bool sweepClockwise, Vector2 end)

Parameters

radius Vector2
rotationDegrees float
isLargeArc bool
sweepClockwise bool
end Vector2

Returns

DrawingPath

Close()

Closes the current contour.

public DrawingPath Close()

Returns

DrawingPath

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

point Vector2
transform Matrix
fillRule FillRule
tolerance float

Returns

bool

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

point Vector2
transform Matrix
tolerance float

Returns

bool

CubicTo(Vector2, Vector2, Vector2)

Adds a cubic Bezier segment.

public DrawingPath CubicTo(Vector2 control1, Vector2 control2, Vector2 end)

Parameters

control1 Vector2
control2 Vector2
end Vector2

Returns

DrawingPath

CubicToRelative(Vector2, Vector2, Vector2)

public DrawingPath CubicToRelative(Vector2 control1, Vector2 control2, Vector2 end)

Parameters

control1 Vector2
control2 Vector2
end Vector2

Returns

DrawingPath

Freeze()

public void Freeze()

HorizontalTo(float)

public DrawingPath HorizontalTo(float x)

Parameters

x float

Returns

DrawingPath

HorizontalToRelative(float)

public DrawingPath HorizontalToRelative(float offset)

Parameters

offset float

Returns

DrawingPath

LineTo(Vector2)

Adds a straight segment to the supplied point.

public DrawingPath LineTo(Vector2 point)

Parameters

point Vector2

Returns

DrawingPath

LineToRelative(Vector2)

public DrawingPath LineToRelative(Vector2 offset)

Parameters

offset Vector2

Returns

DrawingPath

MoveTo(Vector2)

Begins a contour at the supplied point.

public DrawingPath MoveTo(Vector2 point)

Parameters

point Vector2

Returns

DrawingPath

MoveToRelative(Vector2)

public DrawingPath MoveToRelative(Vector2 offset)

Parameters

offset Vector2

Returns

DrawingPath

Parse(string)

public static DrawingPath Parse(string data)

Parameters

data string

Returns

DrawingPath

QuadraticTo(Vector2, Vector2)

public DrawingPath QuadraticTo(Vector2 control, Vector2 end)

Parameters

control Vector2
end Vector2

Returns

DrawingPath

QuadraticToRelative(Vector2, Vector2)

public DrawingPath QuadraticToRelative(Vector2 control, Vector2 end)

Parameters

control Vector2
end Vector2

Returns

DrawingPath

SmoothCubicTo(Vector2, Vector2)

public DrawingPath SmoothCubicTo(Vector2 control2, Vector2 end)

Parameters

control2 Vector2
end Vector2

Returns

DrawingPath

SmoothCubicToRelative(Vector2, Vector2)

public DrawingPath SmoothCubicToRelative(Vector2 control2, Vector2 end)

Parameters

control2 Vector2
end Vector2

Returns

DrawingPath

SmoothQuadraticTo(Vector2)

public DrawingPath SmoothQuadraticTo(Vector2 end)

Parameters

end Vector2

Returns

DrawingPath

SmoothQuadraticToRelative(Vector2)

public DrawingPath SmoothQuadraticToRelative(Vector2 end)

Parameters

end Vector2

Returns

DrawingPath

VerticalTo(float)

public DrawingPath VerticalTo(float y)

Parameters

y float

Returns

DrawingPath

VerticalToRelative(float)

public DrawingPath VerticalToRelative(float offset)

Parameters

offset float

Returns

DrawingPath