package main

func main() {
	canvas := image.NewRGBA(image.Rect(0, 0, 3840, 2160))
	circles := Circles(canvas.Bounds(), 2160/6)

	// draw n circles
	for i := 0; i < 24; i++ {
		c := <-circles

		draw.Draw(canvas, c.Bounds(), xor{c, canvas}, c.Bounds().Min, draw.Src)
		/*
			draw.DrawMask(
				canvas, canvas.Bounds(), &image.Uniform{color.White},
				image.Point{}, xor{c, canvas}, image.Point{}, draw.Src,
			)
		*/
	}
	/*
		newCanvas := image.NewRGBA(canvas.Bounds())
		draw.Draw(newCanvas, newCanvas.Bounds(), &image.Uniform{color.RGBA{255, 255, 0, 255}}, image.ZP, draw.Over)
		draw.Draw(newCanvas, newCanvas.Bounds(), canvas, image.ZP, draw.Over)
	*/
	err := png.Encode(os.Stdout, BlackAndWhite{canvas})
	if err != nil {
		panic(err)
	}
}
