Table of Contents

Class PathGeometry

Namespace
PluginUI
Assembly
PluginUI.dll

Device-independent vector path made of figures (move/line/curve/arc commands). Converted to a Direct2D geometry when drawn.

public sealed class PathGeometry
Inheritance
PathGeometry
Inherited Members

Properties

IsEmpty

true if no command was added.

public bool IsEmpty { get; }

Property Value

bool

Winding

Fill rule: false = alternate (even-odd), true = winding (non-zero).

public bool Winding { get; set; }

Property Value

bool

Methods

Arc(Point, float, float, float)

Circular arc. Angles are in degrees, clockwise from 12 o'clock (knob convention).

public static PathGeometry Arc(Point center, float radius, float startDegrees, float sweepDegrees)

Parameters

center Point
radius float
startDegrees float
sweepDegrees float

Returns

PathGeometry

ArcTo(Point, Size, bool, bool, float)

Elliptic arc segment (SVG semantics).

public PathGeometry ArcTo(Point end, Size radius, bool clockwise, bool largeArc = false, float rotationDegrees = 0)

Parameters

end Point
radius Size
clockwise bool
largeArc bool
rotationDegrees float

Returns

PathGeometry

Clear()

Removes every command.

public void Clear()

Close()

Closes the current figure.

public PathGeometry Close()

Returns

PathGeometry

CubicTo(Point, Point, Point)

Cubic Bézier segment.

public PathGeometry CubicTo(Point control1, Point control2, Point end)

Parameters

control1 Point
control2 Point
end Point

Returns

PathGeometry

LineTo(Point)

Straight segment.

public PathGeometry LineTo(Point p)

Parameters

p Point

Returns

PathGeometry

LineTo(float, float)

Straight segment.

public PathGeometry LineTo(float x, float y)

Parameters

x float
y float

Returns

PathGeometry

MoveTo(Point)

Starts a new figure.

public PathGeometry MoveTo(Point p)

Parameters

p Point

Returns

PathGeometry

MoveTo(float, float)

Starts a new figure.

public PathGeometry MoveTo(float x, float y)

Parameters

x float
y float

Returns

PathGeometry

Pie(Point, float, float, float)

Pie slice (closed). Angles in degrees, clockwise from 12 o'clock.

public static PathGeometry Pie(Point center, float radius, float startDegrees, float sweepDegrees)

Parameters

center Point
radius float
startDegrees float
sweepDegrees float

Returns

PathGeometry

PointOnCircle(Point, float, float)

Point on a circle; angle in degrees clockwise from 12 o'clock.

public static Point PointOnCircle(Point center, float radius, float degrees)

Parameters

center Point
radius float
degrees float

Returns

Point

Polygon(ReadOnlySpan<Point>)

Closed polygon.

public static PathGeometry Polygon(ReadOnlySpan<Point> points)

Parameters

points ReadOnlySpan<Point>

Returns

PathGeometry

Polyline(ReadOnlySpan<Point>)

Open polyline.

public static PathGeometry Polyline(ReadOnlySpan<Point> points)

Parameters

points ReadOnlySpan<Point>

Returns

PathGeometry

QuadTo(Point, Point)

Quadratic Bézier segment.

public PathGeometry QuadTo(Point control, Point end)

Parameters

control Point
end Point

Returns

PathGeometry

RingSegment(Point, float, float, float, float)

Thick ring segment (closed annulus sector), handy for filled value arcs.

public static PathGeometry RingSegment(Point center, float innerRadius, float outerRadius, float startDegrees, float sweepDegrees)

Parameters

center Point
innerRadius float
outerRadius float
startDegrees float
sweepDegrees float

Returns

PathGeometry

RoundedRect(Rect, float, float, float, float)

Rounded rectangle with individual corner radii (top-left, top-right, bottom-right, bottom-left).

public static PathGeometry RoundedRect(Rect r, float tl, float tr, float br, float bl)

Parameters

r Rect
tl float
tr float
br float
bl float

Returns

PathGeometry