From 2e7baa0204e5c65f3783c60bc064ae828633dd90 Mon Sep 17 00:00:00 2001 From: Sebastien Binet Date: Sat, 18 Apr 2015 23:54:16 +0200 Subject: [PATCH 1/2] doc: markdown-ify wiki: add test results images --- README | 35 ----------------------------------- README.md | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 35 deletions(-) delete mode 100644 README create mode 100644 README.md diff --git a/README b/README deleted file mode 100644 index b74d8a8..0000000 --- a/README +++ /dev/null @@ -1,35 +0,0 @@ - - -This package (written in *[http://golang.org go]*) provide an API to draw 2d geometrical form on [http://golang.org/pkg/image/ images]. -This library is largely inspired by [http://www.tailrecursive.org/postscript/ postscript], [http://cairographics.org/ cairo], [http://dev.w3.org/html5/canvas-api/canvas-2d-api.html#the-2d-drawing-context HTML5 canvas]. - -The package depends on [http://code.google.com/p/freetype-go/ freetype-go] package thanks to its rasterization algorithm. - -Some algorithm have been translated from http://www.antigrain.com project ([http://www.antigrain.com/research/adaptive_bezier/index.html adaptive bezier], and arc drawing) - -=== Installation ==== -Once you have Go installed, to install draw2d: - - * First see the installation procedure of [http://code.google.com/p/freetype-go/ freetype-go] - * `go get github.com/llgcode/draw2d/draw2d` - -a good starting point is the [http://github.com/llgcode/draw2d/wiki/GettingStarted getting started] - - -=== [http://github.com/llgcode/draw2d/wiki/Samples Samples] === -Sample images generated by draw2d (inspired by [http://cairographics.org/samples/ cairo samples]): -there's already some bugs please refer to [http://github.com/llgcode/draw2d/issues issue tracking] - -[http://draw2d.googlecode.com/svn/wiki/test_results/TestPath.png] -[http://draw2d.googlecode.com/svn/wiki/test_results/TestDrawArc.png] -[http://draw2d.googlecode.com/svn/wiki/test_results/TestDrawArcNegative.png] -[http://draw2d.googlecode.com/svn/wiki/test_results/TestCurveRectangle.png] -[http://draw2d.googlecode.com/svn/wiki/test_results/TestDrawCubicCurve.png] -[http://draw2d.googlecode.com/svn/wiki/test_results/TestDash.png] -[http://draw2d.googlecode.com/svn/wiki/test_results/TestFillStroke.png] -[http://draw2d.googlecode.com/svn/wiki/test_results/TestFillStyle.png] -[http://draw2d.googlecode.com/svn/wiki/test_results/TestMultiSegmentCaps.png] -[http://draw2d.googlecode.com/svn/wiki/test_results/TestRoundRectangle.png] -[http://draw2d.googlecode.com/svn/wiki/test_results/TestLineCap.png] -[http://draw2d.googlecode.com/svn/wiki/test_results/TestLineJoin.png] - diff --git a/README.md b/README.md new file mode 100644 index 0000000..a036d92 --- /dev/null +++ b/README.md @@ -0,0 +1,37 @@ +draw2d +====== + +This package (written in [go](http://golang.org)) provides an API to draw 2d geometrical forms on [images](http://golang.org/pkg/image). +This library is largely inspired by [postscript](http://www.tailrecursive.org/postscript), [cairo](http://cairographics.org) and [HTML5 canvas](http://dev.w3.org/html5/canvas-api/canvas-2d-api.html#the-2d-drawing-context). + +The package depends on [freetype-go](http://code.google.com/p/freetype-go) package for its rasterization algorithm. + +Some algorithms have been translated from the [antigrain.com](http://www.antigrain.com) project ([adaptive bezier](http://www.antigrain.com/research/adaptive_bezier/index.html), and arc drawing.) + +## Installation +Once you have Go installed, to install `draw2d`: + +```sh +$ go get github.com/llgcode/draw2d/draw2d +``` + +a good starting point is the [getting started](http://github.com/llgcode/draw2d/wiki/GettingStarted) wiki page. + + +## [Samples](http://github.com/llgcode/draw2d/wiki/Samples) +[Sample](https://github.com/llgcode/draw2d/wiki/Samples) images generated by `draw2d` (inspired by [cairo samples](http://cairographics.org/samples): + +If you find bugs, please refer to the [issue tracker](http://github.com/llgcode/draw2d/issues). + +![Path](https://github.com/llgcode/draw2d/wiki/test_results/TestPath.png) +![DrawArc](https://github.com/llgcode/draw2d/wiki/test_results/TestDrawArc.png) +![DrawArcNegative](https://github.com/llgcode/draw2d/wiki/test_results/TestDrawArcNegative.png) +![CurveRectangle](https://github.com/llgcode/draw2d/wiki/test_results/TestCurveRectangle.png) +![DrawCubicCurve](https://github.com/llgcode/draw2d/wiki/test_results/TestDrawCubicCurve.png) +![Dash](https://github.com/llgcode/draw2d/wiki/test_results/TestDash.png) +![FillStroke](https://github.com/llgcode/draw2d/wiki/test_results/TestFillStroke.png) +![FillStyle](https://github.com/llgcode/draw2d/wiki/test_results/TestFillStyle.png) +![MultiSegmentCaps](https://github.com/llgcode/draw2d/wiki/test_results/TestMultiSegmentCaps.png) +![RoundRectangle](https://github.com/llgcode/draw2d/wiki/test_results/TestRoundRectangle.png) +![LineCap](https://github.com/llgcode/draw2d/wiki/test_results/TestLineCap.png) +![LineJoin](https://github.com/llgcode/draw2d/wiki/test_results/TestLineJoin.png) From f1d2545bc59e1f09f83a62c8cea24d80e42772e2 Mon Sep 17 00:00:00 2001 From: Sebastien Binet Date: Sun, 19 Apr 2015 00:32:22 +0200 Subject: [PATCH 2/2] gitignore: translate from hgignore --- .gitignore | 19 +++++++++++++++++++ .hgignore | 23 ----------------------- 2 files changed, 19 insertions(+), 23 deletions(-) create mode 100644 .gitignore delete mode 100644 .hgignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..e71e995 --- /dev/null +++ b/.gitignore @@ -0,0 +1,19 @@ +.DS_Store +**/*.[568ao] +**/*.ao +**/*.so +**/*.pyc +**/._* +**/.nfs.* +**/[568a].out +**/*.exe +**/*~ +**/*.orig +core +_obj +_test +out.png +_test* + +**/*.dll +**/core*[0-9] diff --git a/.hgignore b/.hgignore deleted file mode 100644 index 7cbae3c..0000000 --- a/.hgignore +++ /dev/null @@ -1,23 +0,0 @@ -syntax:glob -.DS_Store -.git -.gitignore -*.[568ao] -*.ao -*.so -*.pyc -._* -.nfs.* -[568a].out -*.exe -*~ -*.orig -core -_obj -_test -out.png -_test* - -syntax: regexp -\.dll$ -^.*/core.[0-9]*$