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
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
Returns
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
Returns
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
Returns
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
Returns
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
Returns
Close()
Closes the figure with a straight segment back to where it started.
public VectorPath Close()
Returns
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
Returns
LineTo(float, float)
A straight segment to (x, y).
public VectorPath LineTo(float x, float y)
Parameters
Returns
MoveTo(float, float)
Starts a new figure at (x, y).
public VectorPath MoveTo(float x, float y)
Parameters
Returns
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)