Close#
func (builder *PathBuilder) Close()Close closes the current contour.
type PathBuilder struct {
// contains filtered or unexported fields
}PathBuilder assembles path geometry in a reusable command buffer, so a path derived from data every frame (a chart series, a sparkline) costs no heap allocation once the buffer has grown to its working size. The zero value is ready to use.
Path returns a view of the buffer rather than a copy: it stays valid until the next Reset, and DrawPath never retains it. Use NewPath for geometry that outlives the builder.
Close#func (builder *PathBuilder) Close()Close closes the current contour.
CubicTo#func (builder *PathBuilder) CubicTo(c1x, c1y, c2x, c2y, x, y float32)CubicTo appends a cubic curve to the current contour.
Len#func (builder *PathBuilder) Len() intLen is the number of commands recorded since the last Reset.
LineTo#func (builder *PathBuilder) LineTo(x, y float32)LineTo appends a straight segment to the current contour.
MoveTo#func (builder *PathBuilder) MoveTo(x, y float32)MoveTo begins a new contour.
Path#func (builder *PathBuilder) Path(width, height float32) PathPath returns the recorded geometry in a width by height view box, or the empty path when the box is degenerate or nothing was recorded. The result aliases the builder's buffer and is invalidated by Reset and by further commands.
QuadTo#func (builder *PathBuilder) QuadTo(cx, cy, x, y float32)QuadTo appends a quadratic curve to the current contour.
Reset#func (builder *PathBuilder) Reset()Reset empties the builder and keeps its capacity.