提交 2e8bf4f4 编写于 作者: N Nigel Tao

freetype: Update examples to use explicit colors.

R=rsc
CC=golang-dev
http://codereview.appspot.com/1848055
上级 2af394da
...@@ -119,11 +119,11 @@ func showNodes(m *image.RGBA, ns []node) { ...@@ -119,11 +119,11 @@ func showNodes(m *image.RGBA, ns []node) {
var c image.Color var c image.Color
switch n.degree { switch n.degree {
case 0: case 0:
c = image.Aqua c = image.RGBAColor{0, 255, 255, 255}
case 1: case 1:
c = image.Red c = image.RGBAColor{255, 0, 0, 255}
case 2: case 2:
c = image.Red c = image.RGBAColor{255, 0, 0, 255}
} }
if c != nil { if c != nil {
m.Set(x, y, c) m.Set(x, y, c)
......
...@@ -72,7 +72,7 @@ func main() { ...@@ -72,7 +72,7 @@ func main() {
theta := math.Pi * float64(j) / (n - 1) theta := math.Pi * float64(j) / (n - 1)
dx := raster.Fix32(r * math.Cos(theta)) dx := raster.Fix32(r * math.Cos(theta))
dy := raster.Fix32(r * math.Sin(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})
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册