Update README.md

This commit is contained in:
Michael Fogleman 2016-02-19 17:05:21 -05:00
parent be43f59692
commit 54f635062b

View File

@ -111,3 +111,29 @@ If you need any of the features below, I recommend using `cairo` instead.
- Gradients / Patterns - Gradients / Patterns
- Cubic Beziers - Cubic Beziers
- Dashed Lines - 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)