Table of Contents

Class VectorPath

Namespace
Rustaveli.Pdf
Assembly
Rustaveli.Pdf.dll

A path of straight and curved segments, in one or more closed or open figures, for artwork to fill, stroke or clip to. Coordinates are in points, Y running down.

public sealed class VectorPath
Inheritance
VectorPath
Inherited Members

Remarks

Quadratic curves and elliptical arcs are kept as the cubic curves that draw them exactly (quadratics) or to within a hair's breadth (arcs, a quarter turn to a cubic), so every surface draws the same segments.

Properties

IsEmpty

Whether the path has no segments.

public bool IsEmpty { get; }

Property Value

bool

Methods

AddCircle(float, float, float)

A circle centred at (centreX, centreY), as a closed figure.

public VectorPath AddCircle(float centreX, float centreY, float radius)

Parameters

centreX float
centreY float
radius float

Returns

VectorPath

AddEllipse(float, float, float, float)

An ellipse centred at (centreX, centreY), as a closed figure.

public VectorPath AddEllipse(float centreX, float centreY, float radiusX, float radiusY)

Parameters

centreX float
centreY float
radiusX float
radiusY float

Returns

VectorPath

AddRectangle(float, float, float, float)

A rectangle, as a closed figure drawn clockwise from its top left.

public VectorPath AddRectangle(float x, float y, float width, float height)

Parameters

x float
y float
width float
height float

Returns

VectorPath

AddRoundedRectangle(float, float, float, float, Corners)

A rectangle with each corner rounded to its own radius, fitted to the rectangle as CSS fits them.

public VectorPath AddRoundedRectangle(float x, float y, float width, float height, Corners corners)

Parameters

x float
y float
width float
height float
corners Corners

Returns

VectorPath

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

An elliptical arc to (x, y), as SVG draws one: radii, the ellipse's turn in degrees, and which of the four possible arcs — the large or the small, clockwise or not.

public VectorPath ArcTo(float radiusX, float radiusY, float rotation, bool largeArc, bool clockwise, float x, float y)

Parameters

radiusX float
radiusY float
rotation float
largeArc bool
clockwise bool
x float
y float

Returns

VectorPath

Close()

Closes the figure with a straight segment back to where it started.

public VectorPath Close()

Returns

VectorPath

CurveTo(float, float, float, float, float, float)

A cubic Bézier curve to (x, y) through two control points.

public VectorPath CurveTo(float x1, float y1, float x2, float y2, float x, float y)

Parameters

x1 float
y1 float
x2 float
y2 float
x float
y float

Returns

VectorPath

LineTo(float, float)

A straight segment to (x, y).

public VectorPath LineTo(float x, float y)

Parameters

x float
y float

Returns

VectorPath

MoveTo(float, float)

Starts a new figure at (x, y).

public VectorPath MoveTo(float x, float y)

Parameters

x float
y float

Returns

VectorPath

QuadraticTo(float, float, float, float)

A quadratic Bézier curve to (x, y) through one control point.

public VectorPath QuadraticTo(float controlX, float controlY, float x, float y)

Parameters

controlX float
controlY float
x float
y float

Returns

VectorPath