From 9bd0ecf14ed351b78aff3f8e7ff9c96afaebd6f4 Mon Sep 17 00:00:00 2001 From: Stani Date: Sun, 12 Jul 2015 03:04:30 +0200 Subject: [PATCH] use filenames in examples README --- README.md | 7 ++++--- draw2d.go | 2 +- draw2dpdf/doc.go | 6 ++++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 31b1091..21c2d94 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ draw2d ====== -Package draw2d is a pure [go](http://golang.org) 2D vector graphics library with support for multiple output devices such as [images](http://golang.org/pkg/image) (draw2d), pdf documents (draw2dpdf) and opengl (draw2dopengl), which can also be used on the google app engine. It can be used as a pure go [Cairo](http://www.cairographics.org/) alternative. draw2d is released under the BSD license. See the [documentation](http://godoc.org/github.com/llgcode/draw2d) for more details. +Package draw2d is a pure [go](http://golang.org) 2D vector graphics library with support for multiple output devices such as [images](http://golang.org/pkg/image) (draw2d), pdf documents (draw2dpdf) and opengl (draw2dgl), which can also be used on the google app engine. It can be used as a pure go [Cairo](http://www.cairographics.org/) alternative. draw2d is released under the BSD license. See the [documentation](http://godoc.org/github.com/llgcode/draw2d) for more details. [![geometry](https://raw.githubusercontent.com/llgcode/draw2d/master/output/samples/geometry.png)](https://raw.githubusercontent.com/llgcode/draw2d/master/resource/image/geometry.pdf)[![postscript](https://raw.githubusercontent.com/llgcode/draw2d/master/output/samples/postscript.png)](https://raw.githubusercontent.com/llgcode/draw2d/master/resource/image/postscript.pdf) @@ -46,7 +46,7 @@ gc.Close() gc.FillStroke() // Save to file -draw2d.SaveToPngFile(fn, dest) +draw2d.SaveToPngFile("hello.png", dest) ``` The same Go code can also generate a pdf document with package draw2dpdf: @@ -69,7 +69,7 @@ gc.Close() gc.FillStroke() // Save to file -draw2dpdf.SaveToPdfFile(fn, dest) +draw2dpdf.SaveToPdfFile("hello.pdf", dest) ``` There are more examples here: https://github.com/llgcode/draw2d/tree/master/samples @@ -111,3 +111,4 @@ References - [antigrain.com](http://www.antigrain.com) - [freetype-go](http://code.google.com/p/freetype-go) + - diff --git a/draw2d.go b/draw2d.go index a547c28..9e6a731 100644 --- a/draw2d.go +++ b/draw2d.go @@ -43,7 +43,7 @@ // gc.FillStroke() // // // Save to file -// draw2d.SaveToPngFile(fn, dest) +// draw2d.SaveToPngFile("hello.png", dest) // // There are more examples here: // https://github.com/llgcode/draw2d/tree/master/samples diff --git a/draw2dpdf/doc.go b/draw2dpdf/doc.go index 846f336..922099c 100644 --- a/draw2dpdf/doc.go +++ b/draw2dpdf/doc.go @@ -2,7 +2,7 @@ // created: 26/06/2015 by Stani Michiels // Package draw2dpdf provides a graphic context that can draw vector -// graphics and text on pdf file. +// graphics and text on pdf file with the gofpdf package. // // Quick Start // @@ -25,11 +25,13 @@ // gc.FillStroke() // // // Save to file -// draw2dpdf.SaveToPdfFile(fn, dest) +// draw2dpdf.SaveToPdfFile("hello.pdf", dest) // // There are more examples here: // https://github.com/llgcode/draw2d/tree/master/samples // +// Alternative backends +// // Drawing on images is provided by the draw2d package. // Drawing on opengl is provided by the draw2dgl package. //