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)