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 (
"fmt"
"exp/draw"
"exp/draw/x11"
"image/draw"
"image/draw/x11"
"image"
"math"
"draw2d.googlecode.com/hg/draw2d"

View File

@ -91,7 +91,7 @@ func android(gc draw2d.GraphicContext, x, y float64) {
func main() {
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})
android(gc, 10, 10)
saveToPngFile("TestAndroid", i)

View File

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

View File

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

View File

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

View File

@ -3,7 +3,7 @@
package draw2d
import (
"exp/draw"
"image/draw"
"image"
"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
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
// can inline such function calls.
ma := s.A >> 16

View File

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

View File

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

View File

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB