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 declares 6 methods for Path objects in Go programs. Available methods include: Arc, Close, CurveTo, LineTo, MoveTo, QuadTo. Public members are accessible to any Go application after installing the Aspose.PDF FOSS for Go package.

Methods

SignatureDescription
MoveTo(x: float64, y: float64) → *PathMoveTo begins a new subpath at (x, y).
LineTo(x: float64, y: 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, c1y: float64, c2x: float64, c2y: float64, x: float64, y: 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, cy: float64, x: float64, y: 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, cy: float64, r: float64, startAngle: float64, sweepAngle: float64) → *PathArc adds an arc to the path, approximated by cubic Bezier curves.

See Also

 English