update tests

This commit is contained in:
legoff.laurent 2010-12-06 13:57:26 +00:00
parent 0bff8ca6ee
commit 0176a80331
5 changed files with 16 additions and 14 deletions

View File

@ -11,8 +11,8 @@ import (
"image" "image"
"image/png" "image/png"
"draw2d" //"draw2d"
//"draw2d.googlecode.com/svn/trunk/draw2d/src/pkg/draw2d" "draw2d.googlecode.com/svn/trunk/draw2d/src/pkg/draw2d"
) )

View File

@ -6,8 +6,8 @@ import (
"exp/draw/x11" "exp/draw/x11"
"image" "image"
"math" "math"
"draw2d" //"draw2d"
//"draw2d.googlecode.com/svn/trunk/draw2d/src/pkg/draw2d" "draw2d.googlecode.com/svn/trunk/draw2d/src/pkg/draw2d"
) )
func main() { func main() {

View File

@ -11,12 +11,12 @@ import (
"math" "math"
"image" "image"
"image/png" "image/png"
"draw2d" //"draw2d"
//"draw2d.googlecode.com/svn/trunk/draw2d/src/pkg/draw2d" "draw2d.googlecode.com/svn/trunk/draw2d/src/pkg/draw2d"
) )
const ( const (
width, height = 500, 500 width, height = 178, 224
) )
var ( var (
@ -93,6 +93,8 @@ func android(gc *draw2d.GraphicContext, x, y float) {
func main() { func main() {
i, gc := initGc(width, height) i, gc := initGc(width, height)
android(gc, 100, 100) gc.SetFillColor(image.RGBAColor{0xff, 0x44, 0x44, 0xff})
gc.SetStrokeColor(image.RGBAColor{0x44, 0x44, 0x44, 0xff})
android(gc, 10, 10)
saveToPngFile("TestAndroid", i) saveToPngFile("TestAndroid", i)
} }

View File

@ -13,8 +13,8 @@ import (
"math" "math"
"image" "image"
"image/png" "image/png"
"draw2d" //"draw2d"
//"draw2d.googlecode.com/svn/trunk/draw2d/src/pkg/draw2d" "draw2d.googlecode.com/svn/trunk/draw2d/src/pkg/draw2d"
) )
const ( const (

View File

@ -11,12 +11,12 @@ import (
"image" "image"
"image/png" "image/png"
"draw2d" //"draw2d"
//"draw2d.googlecode.com/svn/trunk/draw2d/src/pkg/draw2d" "draw2d.googlecode.com/svn/trunk/draw2d/src/pkg/draw2d"
) )
const ( const (
width, height = 500, 300 width, height = 300, 200
) )
var ( var (
@ -129,7 +129,7 @@ func gordon(gc *draw2d.GraphicContext, x, y, w, h float) {
func main() { func main() {
i, gc := initGc(width, height) i, gc := initGc(width, height)
gc.Clear() gc.Clear()
gc.Translate(100, 100) gc.Translate(-75, 58)
gc.Rotate(-30 * (math.Pi / 180.0)) gc.Rotate(-30 * (math.Pi / 180.0))
gordon(gc, 48, 48, 240, 72) gordon(gc, 48, 48, 240, 72)
saveToPngFile("TestGopher", i) saveToPngFile("TestGopher", i)