draw android in green thanks to my wife, rename exp/draw to image/draw

This commit is contained in:
legoff.laurent 2011-06-08 00:31:06 +02:00
parent f4c73f5f01
commit bfefaf854b
10 changed files with 11 additions and 11 deletions

View file

@ -2,8 +2,8 @@ package main
import ( import (
"fmt" "fmt"
"exp/draw" "image/draw"
"exp/draw/x11" "image/draw/x11"
"image" "image"
"math" "math"
"draw2d.googlecode.com/hg/draw2d" "draw2d.googlecode.com/hg/draw2d"

View file

@ -91,7 +91,7 @@ func android(gc draw2d.GraphicContext, x, y float64) {
func main() { func main() {
i, gc := initGc(width, height) i, gc := initGc(width, height)
gc.SetFillColor(image.RGBAColor{0xff, 0x44, 0x44, 0xff}) gc.SetFillColor(image.RGBAColor{0x44, 0xff, 0x44, 0xff})
gc.SetStrokeColor(image.RGBAColor{0x44, 0x44, 0x44, 0xff}) gc.SetStrokeColor(image.RGBAColor{0x44, 0x44, 0x44, 0xff})
android(gc, 10, 10) android(gc, 10, 10)
saveToPngFile("TestAndroid", i) saveToPngFile("TestAndroid", i)

View file

@ -9,7 +9,7 @@ import (
"image" "image"
"time" "time"
"image/png" "image/png"
"exp/draw" "image/draw"
"draw2d.googlecode.com/hg/draw2d" "draw2d.googlecode.com/hg/draw2d"
) )

View file

@ -8,7 +8,7 @@ import (
"bufio" "bufio"
"image" "image"
"image/png" "image/png"
"exp/draw" "image/draw"
"draw2d.googlecode.com/hg/draw2d/raster" "draw2d.googlecode.com/hg/draw2d/raster"
) )

View file

@ -3,7 +3,7 @@
package draw2d package draw2d
import ( import (
"exp/draw" "image/draw"
"image" "image"
"log" "log"
"freetype-go.googlecode.com/hg/freetype" "freetype-go.googlecode.com/hg/freetype"

View file

@ -3,7 +3,7 @@
package draw2d package draw2d
import ( import (
"exp/draw" "image/draw"
"image" "image"
"freetype-go.googlecode.com/hg/freetype/raster" "freetype-go.googlecode.com/hg/freetype/raster"
) )
@ -40,7 +40,7 @@ func (r *NRGBAPainter) Paint(ss []raster.Span, done bool) {
} }
base := s.Y * r.Image.Stride base := s.Y * r.Image.Stride
p := r.Image.Pix[base+s.X0 : base+s.X1] p := r.Image.Pix[base+s.X0 : base+s.X1]
// This code is duplicated from drawGlyphOver in $GOROOT/src/pkg/exp/draw/draw.go. // This code is duplicated from drawGlyphOver in $GOROOT/src/pkg/image/draw/draw.go.
// TODO(nigeltao): Factor out common code into a utility function, once the compiler // TODO(nigeltao): Factor out common code into a utility function, once the compiler
// can inline such function calls. // can inline such function calls.
ma := s.A >> 16 ma := s.A >> 16

View file

@ -3,7 +3,7 @@
package raster package raster
import ( import (
"exp/draw" "image/draw"
"image" "image"
) )

View file

@ -2,7 +2,7 @@
package draw2d package draw2d
import ( import (
"exp/draw" "image/draw"
"image" "image"
"math" "math"
) )

View file

@ -2,7 +2,7 @@ package draw2dgl
import ( import (
"image" "image"
"exp/draw" "image/draw"
"gl" "gl"
"freetype-go.googlecode.com/hg/freetype/raster" "freetype-go.googlecode.com/hg/freetype/raster"
"draw2d.googlecode.com/hg/draw2d" "draw2d.googlecode.com/hg/draw2d"

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB