// Circle draws a circle given a point and radius
Circle draws a circle given a point and radius
// Circle draws a circle given a point and radius
func Circle(display drivers.Displayer, x0 int16, y0 int16, r int16, color color.RGBA) {
	f := 1 - r
	ddfx := int16(1)
	ddfy := -2 * r
	x := int16(0)
	y := r
	display.SetPixel(x0, y0+r, color)
	display.SetPixel(x0, y0-r, color)
	display.SetPixel(x0+r, y0, color)
	display.SetPixel(x0-r, y0, color)
	for x < y {
		if f >= 0 {
			y--
			ddfy += 2
			f += ddfy
		}
		x++
		ddfx += 2
		f += ddfx
		display.SetPixel(x0+x, y0+y, color)
		display.SetPixel(x0-x, y0+y, color)
		display.SetPixel(x0+x, y0-y, color)
		display.SetPixel(x0-x, y0-y, color)
		display.SetPixel(x0+y, y0+x, color)
		display.SetPixel(x0-y, y0+x, color)
		display.SetPixel(x0+y, y0-x, color)
		display.SetPixel(x0-y, y0-x, color)
	}
}
func Circle ( display drivers . Displayer , x0 int16 , y0 int16 , r int16 , color color . RGBA ) { f := 1 - r ddfx := int16 ( 1 ) ddfy := - 2 * r x := int16 ( 0 ) y := r display . SetPixel ( x0 , y0 + r , color ) display . SetPixel ( x0 , y0 - r , color ) display . SetPixel ( x0 + r , y0 , color ) display . SetPixel ( x0 - r , y0 , color ) for x < y { if f >= 0 { y -- ddfy += 2 f += ddfy } x ++ ddfx += 2 f += ddfx display . SetPixel ( x0 + x , y0 + y , color ) display . SetPixel ( x0 - x , y0 + y , color ) display . SetPixel ( x0 + x , y0 - y , color ) display . SetPixel ( x0 - x , y0 - y , color ) display . SetPixel ( x0 + y , y0 + x , color ) display . SetPixel ( x0 - y , y0 + x , color ) display . SetPixel ( x0 + y , y0 - x , color ) display . SetPixel ( x0 - y , y0 - x , color ) } }
Circle draws a circle given a point and radius
Circle draws a circle given a point and radius