Path
Overview
Path is a type in Aspose.PDF FOSS for Go.
Path is a sequence of MoveTo/LineTo/CurveTo/Close operations defining an arbitrary 2D path in PDF user space (origin at page bottom-left, Y up).
This type provides 6 methods for working with Path objects in Go programs.
Available methods include: Arc, Close, CurveTo, LineTo, MoveTo, QuadTo.
All public members are accessible to any Go application after installing the Aspose.PDF FOSS for Go package.
Methods
| Signature | Description |
|---|---|
MoveTo(x: float64) → *Path | MoveTo begins a new subpath at (x, y). |
LineTo(x: float64) → *Path | LineTo adds a straight line segment from the current point to (x, y). |
Close() → *Path | Close closes the current subpath with a line back to the most recent MoveTo. |
CurveTo(c1x: float64) → *Path | CurveTo adds a cubic Bezier curve from the current point to (x, y) with control points (c1x, c1y) and (c2x, c2y). |
QuadTo(cx: float64) → *Path | QuadTo adds a quadratic Bezier curve (one control point) from the current point to (x, y), automatically converted to the equivalent cubic per the standard quadratic-to-cubic formula: |
Arc(cx: float64) → *Path | Arc adds an arc to the path, approximated by cubic Bezier curves. |