aboutsummaryrefslogtreecommitdiffstats
path: root/glcd
diff options
context:
space:
mode:
authorTectu <joel@unormal.org>2012-07-22 14:30:19 -0700
committerTectu <joel@unormal.org>2012-07-22 14:30:19 -0700
commit0da58f180c9d6e4152223c4cc06ace7ec5369185 (patch)
tree72d3092f7512cdd1705893ac5054c2acff03833e /glcd
parentc8662cad57ce842b12897ad8de4ab404b5559ddf (diff)
parentc1a8f5ea2b7900ff1d91644e865da63eb36581cc (diff)
downloaduGFX-0da58f180c9d6e4152223c4cc06ace7ec5369185.tar.gz
uGFX-0da58f180c9d6e4152223c4cc06ace7ec5369185.tar.bz2
uGFX-0da58f180c9d6e4152223c4cc06ace7ec5369185.zip
Merge pull request #16 from trsaunders/master
tidy up bottom and edges of console
Diffstat (limited to 'glcd')
-rw-r--r--glcd/console.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/glcd/console.c b/glcd/console.c
index acfae978..724fae0e 100644
--- a/glcd/console.c
+++ b/glcd/console.c
@@ -100,6 +100,8 @@ msg_t lcdConsoleInit(GLCDConsole *console, uint16_t x0, uint16_t y0, uint16_t wi
console->color = color;
console->font = font;
+
+ lcdDrawRect(x0, y0, width, height,1, console->bkcolor);
}
msg_t lcdConsolePut(GLCDConsole *console, char c) {
@@ -118,6 +120,9 @@ msg_t lcdConsolePut(GLCDConsole *console, char c) {
} else {
width = lcdMeasureChar(c, console->font);
if((console->cx + width) >= console->sx) {
+ /* clear the text at the end of the line */
+ lcdDrawRect(console->cx, console->cy, console->cx + width, console->cy + console->fy,
+ 1, console->bkcolor);
console->cx = 0;
console->cy += console->fy;
}