aboutsummaryrefslogtreecommitdiffstats
path: root/glcd/glcd.c
diff options
context:
space:
mode:
authorTectu <joel@unormal.org>2012-07-25 00:22:50 +0200
committerTectu <joel@unormal.org>2012-07-25 00:22:50 +0200
commitfe61558e8883d45fbe13e121c6885ea77d42f6e8 (patch)
tree1157fe32e815e91ce5af2786772ee52c7d7c78af /glcd/glcd.c
parent428827bab9964254dec401eba56aeea434382c08 (diff)
downloaduGFX-fe61558e8883d45fbe13e121c6885ea77d42f6e8.tar.gz
uGFX-fe61558e8883d45fbe13e121c6885ea77d42f6e8.tar.bz2
uGFX-fe61558e8883d45fbe13e121c6885ea77d42f6e8.zip
fixed lcdRectDraw()
Diffstat (limited to 'glcd/glcd.c')
-rw-r--r--glcd/glcd.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/glcd/glcd.c b/glcd/glcd.c
index 6f61cb5c..6c3a830b 100644
--- a/glcd/glcd.c
+++ b/glcd/glcd.c
@@ -462,12 +462,12 @@ void lcdDrawRect(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint8_t fil
y0 = TempY;
}
if(filled) {
- lcdFillArea(x0, y0, x1, y1, color);
+ lcdFillArea(x0, y0, x1+1, y1+1, color);
} else {
lcdDrawLine(x0, y0, x1, y0, color);
lcdDrawLine(x0, y1, x1, y1, color);
lcdDrawLine(x0, y0, x0, y1, color);
- lcdDrawLine(x1, y0, x1, y1, color);
+ lcdDrawLine(x1, y0, x1, y1+1, color);
}
}
@@ -477,7 +477,7 @@ void lcdDrawRectString(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, const
off_left = ((x1-x0)-lcdMeasureString(str, font))/2;
off_up = ((y1-y0) - lcdGetFontHeight(font)) / 2;
- lcdDrawRect(x0, y0, x1, y1, 1, bkColor);
+ lcdDrawRect(x0, y0, x1, y1, filled, bkColor);
/* Abhishek: default to solid text for this? */
lcdDrawString(x0+off_left, y0+off_up, str, font, fontColor, bkColor, solid);
}