From 0e0aa125a36e4218b891cbfefe1aabafe76d78cf Mon Sep 17 00:00:00 2001 From: Steven Edwards Date: Wed, 19 Aug 2015 15:42:16 -0400 Subject: [PATCH] Replace remaining draw2d.NewGraphicContext instances. --- README.md | 2 +- draw2d.go | 2 +- draw2dpdf/README.md | 4 ++-- draw2dpdf/doc.go | 2 +- samples/README.md | 2 +- samples/appengine/server.go | 4 ++-- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index ab5e06a..07c4bb3 100644 --- a/README.md +++ b/README.md @@ -61,7 +61,7 @@ The same Go code can also generate a pdf document with package draw2dpdf: ```go // Initialize the graphic context on an RGBA image dest := draw2dpdf.NewPdf("L", "mm", "A4") -gc := draw2d.NewGraphicContext(dest) +gc := draw2dpdf.NewGraphicContext(dest) // Set some properties gc.SetFillColor(color.RGBA{0x44, 0xff, 0x44, 0xff}) diff --git a/draw2d.go b/draw2d.go index bd3a6a6..54a7e3f 100644 --- a/draw2d.go +++ b/draw2d.go @@ -28,7 +28,7 @@ // generates a simple drawing and saves it to an image file: // // Initialize the graphic context on an RGBA image // dest := image.NewRGBA(image.Rect(0, 0, 297, 210.0)) -// gc := draw2d.NewGraphicContext(dest) +// gc := draw2dimg.NewGraphicContext(dest) // // // Set some properties // gc.SetFillColor(color.RGBA{0x44, 0xff, 0x44, 0xff}) diff --git a/draw2dpdf/README.md b/draw2dpdf/README.md index 6ac7e99..3208c33 100644 --- a/draw2dpdf/README.md +++ b/draw2dpdf/README.md @@ -10,7 +10,7 @@ The following Go code generates a simple drawing and saves it to a pdf document: ```go // Initialize the graphic context on an RGBA image dest := draw2dpdf.NewPdf("L", "mm", "A4") -gc := draw2d.NewGraphicContext(dest) +gc := draw2dpdf.NewGraphicContext(dest) // Set some properties gc.SetFillColor(color.RGBA{0x44, 0xff, 0x44, 0xff}) @@ -39,4 +39,4 @@ Alternative backends Acknowledgments --------------- -The pdf backend uses https://github.com/jung-kurt/gofpdf \ No newline at end of file +The pdf backend uses https://github.com/jung-kurt/gofpdf diff --git a/draw2dpdf/doc.go b/draw2dpdf/doc.go index 922099c..2ec7081 100644 --- a/draw2dpdf/doc.go +++ b/draw2dpdf/doc.go @@ -10,7 +10,7 @@ // pdf document: // // Initialize the graphic context on an RGBA image // dest := draw2dpdf.NewPdf("L", "mm", "A4") -// gc := draw2d.NewGraphicContext(dest) +// gc := draw2dpdf.NewGraphicContext(dest) // // // Set some properties // gc.SetFillColor(color.RGBA{0x44, 0xff, 0x44, 0xff}) diff --git a/samples/README.md b/samples/README.md index 939c475..8eae2c2 100644 --- a/samples/README.md +++ b/samples/README.md @@ -19,7 +19,7 @@ import ( function main(){} // Initialize the graphic context on an RGBA image dest := image.NewRGBA(image.Rect(0, 0, 297, 210.0)) - gc := draw2d.NewGraphicContext(dest) + gc := draw2dimg.NewGraphicContext(dest) // Draw Android logo fn, err := android.Main(gc, "png") if err != nil { diff --git a/samples/appengine/server.go b/samples/appengine/server.go index bbfa584..ff44895 100644 --- a/samples/appengine/server.go +++ b/samples/appengine/server.go @@ -9,7 +9,7 @@ import ( "image/png" "net/http" - "github.com/llgcode/draw2d" + "github.com/llgcode/draw2d/draw2dimg" "github.com/llgcode/draw2d/draw2dpdf" "github.com/llgcode/draw2d/samples/android" @@ -59,7 +59,7 @@ func imgPng(w http.ResponseWriter, r *http.Request) *appError { // Initialize the graphic context on an RGBA image dest := image.NewRGBA(image.Rect(0, 0, 297, 210.0)) - gc := draw2d.NewGraphicContext(dest) + gc := draw2dimg.NewGraphicContext(dest) // Draw sample android.Draw(gc, 65, 0)