Update README.md
This commit is contained in:
parent
be43f59692
commit
54f635062b
26
README.md
26
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)
|
||||
|
Loading…
Reference in New Issue
Block a user