gg/examples/circle.go
Michael Fogleman 80ced376d0 Draw* helpers
2016-02-18 22:11:53 -05:00

17 lines
303 B
Go

package main
import "github.com/fogleman/dd"
func main() {
dc := dd.NewContext(1000, 1000)
dc.SetSourceRGB(1, 1, 1)
dc.Paint()
dc.DrawCircle(500, 500, 400)
dc.SetSourceRGBA(0, 0, 0, 0.25)
dc.FillPreserve()
dc.SetSourceRGB(0, 0, 0.5)
dc.SetLineWidth(8)
dc.Stroke()
dc.WriteToPNG("out.png")
}