gg/examples/invert-mask.go
2019-01-14 11:04:49 -05:00

15 lines
244 B
Go

package main
import "github.com/fogleman/gg"
func main() {
dc := gg.NewContext(1024, 1024)
dc.DrawCircle(512, 512, 384)
dc.Clip()
dc.InvertMask()
dc.DrawRectangle(0, 0, 1024, 1024)
dc.SetRGB(0, 0, 0)
dc.Fill()
dc.SavePNG("out.png")
}