op/paint: add note that ClipOp intersects the clip, not replace it

Updates #61

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-11-09 18:31:49 +01:00
parent 0dac972b25
commit 560cf6054c
+6 -2
View File
@@ -12,7 +12,7 @@ import (
"gioui.org/op"
)
// Path constructs and adds a ClipOp clip path consisting of lines and
// Path constructs a ClipOp clip path described by lines and
// Bézier curves. Path generates no garbage and can be used for
// dynamic paths; path data is stored directly in the Ops list
// supplied to Begin.
@@ -25,7 +25,11 @@ type Path struct {
macro op.MacroOp
}
// ClipOp sets the current clip path.
// ClipOp 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 ClipOp, use op.StackOp.
type ClipOp struct {
macro op.MacroOp
bounds f32.Rectangle