aboutsummaryrefslogtreecommitdiffstats
path: root/include/gdisp/lld/emulation.c
diff options
context:
space:
mode:
authorMateusz Tomaszkiewicz <silentdemon@gmail.com>2013-06-26 00:47:13 +0200
committerMateusz Tomaszkiewicz <silentdemon@gmail.com>2013-06-26 00:47:13 +0200
commitd3d561535b5a170989cac86b90831002d1bfe73d (patch)
tree2af99f9dd463cbe351d6e80ad3cdbe1da2f3dfa4 /include/gdisp/lld/emulation.c
parent8c3f23f606e9553b84e21f52ab9b2eea883f4ecf (diff)
downloaduGFX-d3d561535b5a170989cac86b90831002d1bfe73d.tar.gz
uGFX-d3d561535b5a170989cac86b90831002d1bfe73d.tar.bz2
uGFX-d3d561535b5a170989cac86b90831002d1bfe73d.zip
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.
Diffstat (limited to 'include/gdisp/lld/emulation.c')
-rw-r--r--include/gdisp/lld/emulation.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/gdisp/lld/emulation.c b/include/gdisp/lld/emulation.c
index c64f8259..49a26697 100644
--- a/include/gdisp/lld/emulation.c
+++ b/include/gdisp/lld/emulation.c
@@ -54,7 +54,7 @@ GDISPDriver GDISP;
if (x1 > x0)
gdisp_lld_fill_area(x0, y0, x1-x0+1, 1, color);
else
- gdisp_lld_fill_area(x0, y1, x0-x1+1, 1, color);
+ gdisp_lld_fill_area(x1, y0, x0-x1+1, 1, color);
return;
}
#endif