gg/examples/circle.go

17 lines
303 B
Go
Raw Normal View History

2016-02-19 04:11:53 +01:00
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")
}