From 2e8bf4f4fa2bce91b65f0b9b567a96ecdcc32477 Mon Sep 17 00:00:00 2001 From: Nigel Tao Date: Wed, 4 Aug 2010 18:49:10 +1000 Subject: [PATCH] freetype: Update examples to use explicit colors. R=rsc CC=golang-dev http://codereview.appspot.com/1848055 --- example/raster/main.go | 6 +++--- example/round/main.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/example/raster/main.go b/example/raster/main.go index 1506581..685e6e8 100644 --- a/example/raster/main.go +++ b/example/raster/main.go @@ -119,11 +119,11 @@ func showNodes(m *image.RGBA, ns []node) { var c image.Color switch n.degree { case 0: - c = image.Aqua + c = image.RGBAColor{0, 255, 255, 255} case 1: - c = image.Red + c = image.RGBAColor{255, 0, 0, 255} case 2: - c = image.Red + c = image.RGBAColor{255, 0, 0, 255} } if c != nil { m.Set(x, y, c) diff --git a/example/round/main.go b/example/round/main.go index 2e66eed..0fad99d 100644 --- a/example/round/main.go +++ b/example/round/main.go @@ -72,7 +72,7 @@ func main() { theta := math.Pi * float64(j) / (n - 1) dx := raster.Fix32(r * math.Cos(theta)) dy := raster.Fix32(r * math.Sin(theta)) - m.Set(int((cx+dx)/256), int((cy+dy)/256), image.Yellow) + m.Set(int((cx+dx)/256), int((cy+dy)/256), image.RGBAColor{255, 255, 0, 255}) } }