Change hbars to make last char in-/decrease vertically

This commit is contained in:
mmdolze
2009-04-11 18:48:13 +00:00
parent 69d963fed2
commit 9502cdde6e
2 changed files with 12 additions and 0 deletions
+1
View File
@@ -67,6 +67,7 @@ v.0.5dev (ongoing development)
+ hd44780 driver: add lineaddress option to support ST7036 (Malte Poeggel)
+ lcdproc: Retrieve per CPU usage statistics on FreeBSD (M. Dolze)
* Change drivers to start in background by default: bayrad, CFontz, ea65, glk
* imon driver: Change hbars to make last char in-/decrease vertically
v.0.5.2
* fix switching on/off the Load screen in lcdproc client using the menu
+11
View File
@@ -399,6 +399,16 @@ MODULE_EXPORT void imon_hbar (Driver *drvthis, int x, int y, int len, int promil
if (x + pos > p->width)
return;
#ifndef IMON_HBARS_OLD
if (pixels >= p->cellwidth ) {
/* write a "full" block to the screen... */
imon_chr(drvthis, x+pos, y, IMON_CHAR_BLOCK_FILLED);
}
else if (pixels >= 1) {
/* write a partial block, albeit vertically... */
imon_chr(drvthis, x+pos, y, pixels * p->cellheight / p->cellwidth);
}
#else
if (pixels >= p->cellwidth * 3/4) {
/* write a "full" block to the screen... */
imon_chr(drvthis, x+pos, y, IMON_CHAR_BLOCK_FILLED);
@@ -413,6 +423,7 @@ MODULE_EXPORT void imon_hbar (Driver *drvthis, int x, int y, int len, int promil
imon_chr(drvthis, x+pos, y, '>');
break;
}
#endif
else {
; // write nothing (not even a space)
}