Documentation
¶
Overview ¶
Package path provides internal path processing utilities.
Package path provides internal path processing utilities.
Index ¶
Constants ¶
const Tolerance = 0.1
Tolerance is the maximum distance from the curve for flattening.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Edge ¶ added in v0.21.1
type Edge struct {
P0, P1 Point
}
Edge represents a line segment from P0 to P1.
func CollectEdges ¶ added in v0.21.1
func CollectEdges(elements []PathElement) []Edge
CollectEdges returns all edges from the path elements. This is a convenience function for cases where all edges are needed at once.
type EdgeIter ¶ added in v0.21.1
type EdgeIter struct {
// contains filtered or unexported fields
}
EdgeIter iterates over edges in a path, correctly handling subpath boundaries. Unlike Flatten which returns a flat []Point list, EdgeIter never creates edges between separate subpaths - it properly closes each subpath to its own start point before moving to the next.
This follows the same pattern as tiny-skia's PathEdgeIter.
func NewEdgeIter ¶ added in v0.21.1
func NewEdgeIter(elements []PathElement) *EdgeIter
NewEdgeIter creates a new edge iterator for the given path elements.
type PathElement ¶
type PathElement interface {
// contains filtered or unexported methods
}
PathElement represents an element in a path.