mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
op/paint: rename material to brush
The "material" name clashes with the theme of the same name. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+2
-2
@@ -3,10 +3,10 @@
|
||||
/*
|
||||
Package paint provides drawing operations for 2D graphics.
|
||||
|
||||
The PaintOp operation draws the current material into a rectangular
|
||||
The PaintOp operation draws the current brush into a rectangular
|
||||
area, taking the current clip path and transformation into account.
|
||||
|
||||
The material is set by either a ColorOp for a constant color, or
|
||||
The current brush is set by either a ColorOp for a constant color, or
|
||||
ImageOp for an image.
|
||||
*/
|
||||
package paint
|
||||
|
||||
+4
-4
@@ -14,7 +14,7 @@ import (
|
||||
"gioui.org/op"
|
||||
)
|
||||
|
||||
// ImageOp sets the material to an image.
|
||||
// ImageOp sets the brush to an image.
|
||||
type ImageOp struct {
|
||||
// Rect is the section if the backing image to use.
|
||||
Rect image.Rectangle
|
||||
@@ -28,15 +28,15 @@ type ImageOp struct {
|
||||
handle interface{}
|
||||
}
|
||||
|
||||
// ColorOp sets the material to a constant color.
|
||||
// ColorOp sets the brush to a constant color.
|
||||
type ColorOp struct {
|
||||
Color color.RGBA
|
||||
}
|
||||
|
||||
// PaintOp draws the current material, respecting the
|
||||
// PaintOp draws the current brush, respecting the
|
||||
// clip path and transformation.
|
||||
type PaintOp struct {
|
||||
// The destination rectangle to paint. If necessary, the material is resized to
|
||||
// The destination rectangle to paint. If necessary, the brush is resized to
|
||||
// cover it.
|
||||
Rect f32.Rectangle
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user