diff options
| author | Sam Anthony <sam@samanthony.xyz> | 2024-01-20 18:03:39 -0500 |
|---|---|---|
| committer | Sam Anthony <sam@samanthony.xyz> | 2024-01-20 18:03:39 -0500 |
| commit | c952a096a161e991a54a569b71c7bb773b583eb3 (patch) | |
| tree | e75f7229db61417b3c12489b0ef6efef0404d719 /ui.go | |
| parent | d33a8a46d8d00117e792608f879e30e7a4b31a37 (diff) | |
| download | volute-c952a096a161e991a54a569b71c7bb773b583eb3.zip | |
use variable rather than function for color constant
Diffstat (limited to 'ui.go')
| -rw-r--r-- | ui.go | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -9,9 +9,7 @@ import ( "strconv" ) -func red() color.RGBA { - return color.RGBA{255, 0, 0, 255} -} +var red = color.RGBA{255, 0, 0, 255} func displacementRow() *g.RowWidget { s := VolumeUnits[volumeUnitIndex] @@ -303,7 +301,7 @@ func updateCompImg() { ps := img.Bounds().Dx() / 100 // Point size draw.Draw(img, image.Rect(pos.X-ps/2, pos.Y-ps/2, pos.X+ps/2, pos.Y+ps/2), - &image.Uniform{red()}, + &image.Uniform{red}, image.ZP, draw.Src, ) |