aboutsummaryrefslogtreecommitdiffstats
path: root/glcd/glcd.c
diff options
context:
space:
mode:
authortrsaunders <trsaunders@gmail.com>2012-07-25 18:37:49 +0100
committertrsaunders <trsaunders@gmail.com>2012-07-25 18:37:49 +0100
commitce5fd37e9ba70d8171b2f27e8afa587a2ac34937 (patch)
tree4b2f9b46b12e70fae396f09e5bc05a882e30d482 /glcd/glcd.c
parentf6ce96a444cd12c0f0d5e835b685f0f2e3dd5cae (diff)
parent999486233dd5ec388a8c1c676c19effc6047b090 (diff)
downloaduGFX-ce5fd37e9ba70d8171b2f27e8afa587a2ac34937.tar.gz
uGFX-ce5fd37e9ba70d8171b2f27e8afa587a2ac34937.tar.bz2
uGFX-ce5fd37e9ba70d8171b2f27e8afa587a2ac34937.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'glcd/glcd.c')
-rw-r--r--glcd/glcd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/glcd/glcd.c b/glcd/glcd.c
index cfb2ce59..13d895b2 100644
--- a/glcd/glcd.c
+++ b/glcd/glcd.c
@@ -280,7 +280,7 @@ glcd_result_t lcdWriteStream(uint16_t *buffer, uint16_t size) {
return (glcd_result_t)chMsgSend(workerThread, (msg_t)&msg);
}
-glcd_result_t lcdVerticalScroll(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, uint16_t lines) {
+glcd_result_t lcdVerticalScroll(uint16_t x0, uint16_t y0, uint16_t x1, uint16_t y1, int16_t lines) {
struct glcd_msg_vertical_scroll msg;
msg.action = GLCD_VERTICAL_SCROLL;
@@ -509,12 +509,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);
}
}
@@ -524,7 +524,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);
}