Modify getting started to use svn url
This commit is contained in:
parent
d32d0cabac
commit
4eaa1d6e1d
1 changed files with 5 additions and 6 deletions
|
@ -1,17 +1,17 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"log"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
"bufio"
|
"bufio"
|
||||||
|
|
||||||
"image"
|
"image"
|
||||||
"image/png"
|
"image/png"
|
||||||
"draw2d"
|
"draw2d.googlecode.com/svn/trunk/draw2d/src/pkg/draw2d"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
func saveToPngFile(filePath string, m image.Image) {
|
func saveToPngFile(filePath string, m image.Image) {
|
||||||
f, err := os.Open(filePath, os.O_CREAT|os.O_WRONLY, 0600)
|
f, err := os.Open(filePath, os.O_CREAT|os.O_WRONLY, 0600)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -39,6 +39,5 @@ func main() {
|
||||||
gc.MoveTo(10.0, 10.0)
|
gc.MoveTo(10.0, 10.0)
|
||||||
gc.LineTo(100.0, 10.0)
|
gc.LineTo(100.0, 10.0)
|
||||||
gc.Stroke()
|
gc.Stroke()
|
||||||
|
saveToPngFile("TestPath.png", i)
|
||||||
saveToPngFile("../../TestPath.png", i)
|
}
|
||||||
}
|
|
Loading…
Reference in a new issue