mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-07 02:15:34 +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
|
img image.Image
|
||||||
imgRect image.Rectangle
|
imgRect image.Rectangle
|
||||||
// Current ColorOp, if any.
|
// Current ColorOp, if any.
|
||||||
color color.NRGBA
|
color color.RGBA
|
||||||
}
|
}
|
||||||
|
|
||||||
type pathOp struct {
|
type pathOp struct {
|
||||||
|
|||||||
+2
-2
@@ -19,7 +19,7 @@ type ImageOp struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type ColorOp struct {
|
type ColorOp struct {
|
||||||
Col color.NRGBA
|
Col color.RGBA
|
||||||
}
|
}
|
||||||
|
|
||||||
type DrawOp struct {
|
type DrawOp struct {
|
||||||
@@ -73,7 +73,7 @@ func (c *ColorOp) Decode(data []byte, refs []interface{}) {
|
|||||||
panic("invalid op")
|
panic("invalid op")
|
||||||
}
|
}
|
||||||
*c = ColorOp{
|
*c = ColorOp{
|
||||||
Col: color.NRGBA{
|
Col: color.RGBA{
|
||||||
R: data[1],
|
R: data[1],
|
||||||
G: data[2],
|
G: data[2],
|
||||||
B: data[3],
|
B: data[3],
|
||||||
|
|||||||
Reference in New Issue
Block a user