gdisp: fixed bug in line drawing function

There was a problem when you drew a line from (x0,y0) to (x1,y1) and
these points met following conditions: y0 = y1 and x0 > x1. The viewport
was set incorrectly to start from (x0,y1) when it should start from
(x1,y0) since x1 is lower in this case.
(x1,y1) would be also OK since y0 = y1.
This commit is contained in:
Mateusz Tomaszkiewicz 2013-06-26 00:47:13 +02:00
parent 8c3f23f606
commit d3d561535b

View file

@ -54,7 +54,7 @@ GDISPDriver GDISP;
if (x1 > x0) if (x1 > x0)
gdisp_lld_fill_area(x0, y0, x1-x0+1, 1, color); gdisp_lld_fill_area(x0, y0, x1-x0+1, 1, color);
else else
gdisp_lld_fill_area(x0, y1, x0-x1+1, 1, color); gdisp_lld_fill_area(x1, y0, x0-x1+1, 1, color);
return; return;
} }
#endif #endif