Skip to content
Snippets Groups Projects
Commit 5e673558 authored by rahix's avatar rahix
Browse files

Merge 'Fix missing pixels in gfx_line()'

See merge request !252
parents 4f101232 977b2498
No related branches found
No related tags found
1 merge request!252gfx: Fix line drawing algorithm
Pipeline #3411 passed
...@@ -198,7 +198,7 @@ static void plot_line_low( ...@@ -198,7 +198,7 @@ static void plot_line_low(
int d = 2 * dy - dx; int d = 2 * dy - dx;
int y = y0; int y = y0;
for (int x = x0; x < x1; x++) { for (int x = x0; x <= x1; x++) {
if (t > 1) { if (t > 1) {
gfx_circle_fill(reg, x, y, t, c); gfx_circle_fill(reg, x, y, t, c);
} else { } else {
...@@ -231,7 +231,7 @@ static void plot_line_high( ...@@ -231,7 +231,7 @@ static void plot_line_high(
int d = 2 * dx - dy; int d = 2 * dx - dy;
int x = x0; int x = x0;
for (int y = y0; y < y1; y++) { for (int y = y0; y <= y1; y++) {
if (t > 1) { if (t > 1) {
gfx_circle_fill(reg, x, y, t, c); gfx_circle_fill(reg, x, y, t, c);
} else { } else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment