Bitmap/Midpoint circle algorithm: Difference between revisions

Content added Content deleted
m (Completed move to correct position)
(Updated D entry)
Line 367: Line 367:


void circle(Color)(Image!Color img, in int x0, in int y0,
void circle(Color)(Image!Color img, in int x0, in int y0,
in int radius, in Color color) pure nothrow {
in int radius, in Color color) pure nothrow @nogc {
int f = 1 - radius;
int f = 1 - radius;
int ddfX = 1;
int ddfX = 1;
Line 402: Line 402:
img.clear(RGB.white);
img.clear(RGB.white);
circle(img, 12, 12, 12, RGB.black);
circle(img, 12, 12, 12, RGB.black);
img.textualShow();
img.textualShow;
}</lang>
}</lang>
{{out}}
{{out}}