cmd,example: fix uses of color.NRGBA

Signed-off-by: Egon Elbre <egonelbre@gmail.com>
This commit is contained in:
Egon Elbre
2020-11-18 20:40:38 +02:00
committed by Elias Naur
parent 21ef492cc9
commit 2affb6eaa4
10 changed files with 32 additions and 35 deletions
+6 -6
View File
@@ -96,11 +96,11 @@ func runEndToEndTest(t *testing.T, driver TestDriver) {
t.Log("starting driver and gio app")
driver.Start("testdata/red.go")
beef := color.RGBA{R: 0xde, G: 0xad, B: 0xbe}
white := color.RGBA{R: 0xff, G: 0xff, B: 0xff}
black := color.RGBA{R: 0x00, G: 0x00, B: 0x00}
gray := color.RGBA{R: 0xbb, G: 0xbb, B: 0xbb}
red := color.RGBA{R: 0xff, G: 0x00, B: 0x00}
beef := color.NRGBA{R: 0xde, G: 0xad, B: 0xbe, A: 0xff}
white := color.NRGBA{R: 0xff, G: 0xff, B: 0xff, A: 0xff}
black := color.NRGBA{R: 0x00, G: 0x00, B: 0x00, A: 0xff}
gray := color.NRGBA{R: 0xbb, G: 0xbb, B: 0xbb, A: 0xff}
red := color.NRGBA{R: 0xff, G: 0x00, B: 0x00, A: 0xff}
// These are the four colors at the beginning.
t.Log("taking initial screenshot")
@@ -181,7 +181,7 @@ func (m colorMismatch) String() string {
)
}
func checkImageCorners(img image.Image, topLeft, topRight, botLeft, botRight color.RGBA) error {
func checkImageCorners(img image.Image, topLeft, topRight, botLeft, botRight color.Color) error {
// The colors are split in four rectangular sections. Check the corners
// of each of the sections. We check the corners left to right, top to
// bottom, like when reading left-to-right text.