WritePNG -> SavePNG

This commit is contained in:
Michael Fogleman 2016-02-19 13:54:55 -05:00
parent 920f472de0
commit 6a8c25552f
7 changed files with 7 additions and 7 deletions

View File

@ -83,7 +83,7 @@ func (dc *Context) Height() int {
return dc.height
}
func (dc *Context) WritePNG(path string) error {
func (dc *Context) SavePNG(path string) error {
return SavePNG(path, dc.im)
}

View File

@ -8,5 +8,5 @@ func main() {
dc.SetRGB(0, 0, 0)
dc.SetLineWidth(10)
dc.Stroke()
dc.WritePNG("out.png")
dc.SavePNG("out.png")
}

View File

@ -13,5 +13,5 @@ func main() {
dc.Fill()
dc.Pop()
}
dc.WritePNG("out.png")
dc.SavePNG("out.png")
}

View File

@ -27,5 +27,5 @@ func main() {
dc.DrawLine(x1, y1, x2, y2)
dc.Stroke()
}
dc.WritePNG("out.png")
dc.SavePNG("out.png")
}

View File

@ -36,5 +36,5 @@ func main() {
dc.SetRGBA(0, 1, 0, 0.5)
dc.SetLineWidth(16)
dc.Stroke()
dc.WritePNG("out.png")
dc.SavePNG("out.png")
}

View File

@ -11,5 +11,5 @@ func main() {
s := "Hello, world!"
w := dc.MeasureString(s)
dc.DrawString(500-w/2, 500, s)
dc.WritePNG("out.png")
dc.SavePNG("out.png")
}

View File

@ -17,5 +17,5 @@ func main() {
dc.DrawImage(im, x*w, y*h)
}
}
dc.WritePNG("out.png")
dc.SavePNG("out.png")
}