Sometimes when I am drawing objects that aren't 'linear' (e.g. rounded edges, circles, ellipses, diagonal lines, etc) I this weird effect of some pixels at certain points not getting drawn.
It's easier to show than explain: This image is created by the code below it. It's a block fading from blue to black. The same effect appears when only using one color. (Though it's otherwise obviously equivalent to just drawing a filled rectangle.)

float b = 100;
int steps = 100;
int thickness = 1;
int basex = 10;
int basey = 10;
int lenx = 200;
int leny = 200;
for(int idx = 0; idx < steps; idx++) {
al_draw_rounded_rectangle(
basex + thickness * (steps - idx), basey + thickness * (steps - idx),
basex + lenx - thickness * (steps - idx), basey + leny - thickness * (steps - idx),
RII, RII,
al_map_rgba(0, 0, b - idx * (b / steps), alpha(0.0)),
thickness);
}
Is there a term for this phenomenon? How do I prevent it from happening?


al_set_new_display_optioncould help. \$\endgroup\$al_draw_rounded_rectange(x1-0.5, y1-0.5, x2+0.5, x2+0.5, rx, ry, color, thickness)\$\endgroup\$