mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-02 16:06:19 +00:00
ui/draw: switch to color.RGBA for colors
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -82,7 +82,7 @@ type drawState struct {
|
||||
img image.Image
|
||||
imgRect image.Rectangle
|
||||
// Current ColorOp, if any.
|
||||
color color.NRGBA
|
||||
color color.RGBA
|
||||
}
|
||||
|
||||
type pathOp struct {
|
||||
|
||||
+2
-2
@@ -19,7 +19,7 @@ type ImageOp struct {
|
||||
}
|
||||
|
||||
type ColorOp struct {
|
||||
Col color.NRGBA
|
||||
Col color.RGBA
|
||||
}
|
||||
|
||||
type DrawOp struct {
|
||||
@@ -73,7 +73,7 @@ func (c *ColorOp) Decode(data []byte, refs []interface{}) {
|
||||
panic("invalid op")
|
||||
}
|
||||
*c = ColorOp{
|
||||
Col: color.NRGBA{
|
||||
Col: color.RGBA{
|
||||
R: data[1],
|
||||
G: data[2],
|
||||
B: data[3],
|
||||
|
||||
Reference in New Issue
Block a user