Documentation
¶
Overview ¶
Package clip provides operations for clipping paint operations. Drawing outside the current clip area is ignored.
The current clip is initially the infinite set. An Op sets the clip to the intersection of the current clip and the clip area it represents. If you need to reset the current clip to its value before applying an Op, use op.StackOp.
General clipping areas are constructed with Path. Simpler special cases such as rectangular clip areas also exist as convenient constructors.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Op ¶
type Op struct {
// contains filtered or unexported fields
}
Op sets the current clip to the intersection of the existing clip with this clip.
If you need to reset the clip to its previous values after applying a Op, use op.StackOp.
type Path ¶
type Path struct {
// contains filtered or unexported fields
}
Path constructs a Op clip path described by lines and Bézier curves, where drawing outside the Path is discarded. The inside-ness of a pixel is determines by the even-odd rule, similar to the SVG rule of the same name.
Path generates no garbage and can be used for dynamic paths; path data is stored directly in the Ops list supplied to Begin.
func (*Path) Cube ¶
Cube records a cubic Bézier from the pen through two control points ending in to.