From 6a8c25552f3b198fbb1aaca8ed38f3d95846e731 Mon Sep 17 00:00:00 2001 From: Michael Fogleman Date: Fri, 19 Feb 2016 13:54:55 -0500 Subject: [PATCH] WritePNG -> SavePNG --- context.go | 2 +- examples/circle.go | 2 +- examples/ellipse.go | 2 +- examples/lines.go | 2 +- examples/star.go | 2 +- examples/text.go | 2 +- examples/tiling.go | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/context.go b/context.go index cffe216..1b558b0 100644 --- a/context.go +++ b/context.go @@ -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) } diff --git a/examples/circle.go b/examples/circle.go index 3fa0a79..9f7a2d5 100644 --- a/examples/circle.go +++ b/examples/circle.go @@ -8,5 +8,5 @@ func main() { dc.SetRGB(0, 0, 0) dc.SetLineWidth(10) dc.Stroke() - dc.WritePNG("out.png") + dc.SavePNG("out.png") } diff --git a/examples/ellipse.go b/examples/ellipse.go index a7558fb..589e53d 100644 --- a/examples/ellipse.go +++ b/examples/ellipse.go @@ -13,5 +13,5 @@ func main() { dc.Fill() dc.Pop() } - dc.WritePNG("out.png") + dc.SavePNG("out.png") } diff --git a/examples/lines.go b/examples/lines.go index a69a8ec..9581dd6 100644 --- a/examples/lines.go +++ b/examples/lines.go @@ -27,5 +27,5 @@ func main() { dc.DrawLine(x1, y1, x2, y2) dc.Stroke() } - dc.WritePNG("out.png") + dc.SavePNG("out.png") } diff --git a/examples/star.go b/examples/star.go index 89b63e3..05c08d6 100644 --- a/examples/star.go +++ b/examples/star.go @@ -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") } diff --git a/examples/text.go b/examples/text.go index 0ab6604..e98ad08 100644 --- a/examples/text.go +++ b/examples/text.go @@ -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") } diff --git a/examples/tiling.go b/examples/tiling.go index e95a743..9688722 100644 --- a/examples/tiling.go +++ b/examples/tiling.go @@ -17,5 +17,5 @@ func main() { dc.DrawImage(im, x*w, y*h) } } - dc.WritePNG("out.png") + dc.SavePNG("out.png") }