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:
Elias Naur
2020-05-14 13:18:21 +02:00
parent 81f474f5d7
commit b7ba809517
2 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -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
View File
@@ -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
}