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

SignatureDescription
MoveTo(x: float64)*PathMoveTo begins a new subpath at (x, y).
LineTo(x: float64)*PathLineTo adds a straight line segment from the current point to (x, y).
Close()*PathClose closes the current subpath with a line back to the most recent MoveTo.
CurveTo(c1x: float64)*PathCurveTo adds a cubic Bezier curve from the current point to (x, y) with control points (c1x, c1y) and (c2x, c2y).
QuadTo(cx: float64)*PathQuadTo 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)*PathArc adds an arc to the path, approximated by cubic Bezier curves.

See Also