From 54f635062b09680cabb457d738ec257546e680ec Mon Sep 17 00:00:00 2001 From: Michael Fogleman Date: Fri, 19 Feb 2016 17:05:21 -0500 Subject: [PATCH] Update README.md --- README.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/README.md b/README.md index de65de3..cc3f5eb 100644 --- a/README.md +++ b/README.md @@ -111,3 +111,29 @@ If you need any of the features below, I recommend using `cairo` instead. - Gradients / Patterns - Cubic Beziers - Dashed Lines + +## Another Example + +See the output of this example below. + +```go +package main + +import "github.com/fogleman/gg" + +func main() { + const S = 1024 + dc := gg.NewContext(S, S) + dc.SetRGBA(0, 0, 0, 0.1) + for i := 0; i < 360; i += 15 { + dc.Push() + dc.RotateAbout(gg.Radians(float64(i)), S/2, S/2) + dc.DrawEllipse(S/2, S/2, S*7/16, S/8) + dc.Fill() + dc.Pop() + } + dc.SavePNG("out.png") +} +``` + +![Ellipses](http://i.imgur.com/J9CBZef.png)