freetype: Update examples to use explicit colors.

R=rsc
CC=golang-dev
http://codereview.appspot.com/1848055
This commit is contained in:
Nigel Tao 2010-08-04 18:49:10 +10:00
parent 2af394dab9
commit 2e8bf4f4fa
2 changed files with 4 additions and 4 deletions

View file

@ -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)

View file

@ -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})
}
}