gg/examples/clip.go

16 lines
268 B
Go
Raw Normal View History

2016-02-25 20:16:48 +01:00
package main
import "github.com/fogleman/gg"
func main() {
dc := gg.NewContext(1000, 1000)
dc.DrawCircle(350, 500, 300)
dc.Clip()
dc.DrawCircle(650, 500, 300)
dc.Clip()
dc.DrawRectangle(0, 0, 1000, 1000)
dc.SetRGB(0, 0, 0)
dc.Fill()
dc.SavePNG("out.png")
}