aboutsummaryrefslogtreecommitdiffstats
path: root/src/gdisp/gdisp.c
diff options
context:
space:
mode:
authorCorentin Barman <corentin.barman@hotmail.com>2016-11-09 19:22:06 +0100
committerCorentin Barman <corentin.barman@hotmail.com>2016-11-09 19:22:06 +0100
commitff65d4f2204a074e832b1274ed2507a45005d83a (patch)
tree22c07b1c0e614d174b12a17d7a2563bfc652f09f /src/gdisp/gdisp.c
parent7f4bfaadd5ad1bf2feaf0645e429e30cbe8fad18 (diff)
downloaduGFX-ff65d4f2204a074e832b1274ed2507a45005d83a.tar.gz
uGFX-ff65d4f2204a074e832b1274ed2507a45005d83a.tar.bz2
uGFX-ff65d4f2204a074e832b1274ed2507a45005d83a.zip
Fixing bug in gdispGFillConvexPoly
Diffstat (limited to 'src/gdisp/gdisp.c')
-rw-r--r--src/gdisp/gdisp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gdisp/gdisp.c b/src/gdisp/gdisp.c
index 9e7c25e0..ec7fef40 100644
--- a/src/gdisp/gdisp.c
+++ b/src/gdisp/gdisp.c
@@ -2950,6 +2950,7 @@ void gdispGDrawBox(GDisplay *g, coord_t x, coord_t y, coord_t cx, coord_t cy, co
/* Replace the appropriate point */
if (ymax == lpnt->y) {
+ lx -= FIXED0_5;
for (lpnt = lpnt <= pntarray ? epnts : lpnt-1; lpnt->y == y; cnt--) {
if (!cnt) {
autoflush(g);
@@ -2962,6 +2963,7 @@ void gdispGDrawBox(GDisplay *g, coord_t x, coord_t y, coord_t cx, coord_t cy, co
lk = (FIXED(lpnt->x) - lx) / (lpnt->y - y);
lx += FIXED0_5;
} else {
+ rx -= FIXED0_5;
for (rpnt = rpnt >= epnts ? pntarray : rpnt+1; rpnt->y == y; cnt--) {
if (!cnt) {
autoflush(g);