summaryrefslogtreecommitdiff
path: root/apps/recorder/widgets.c
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2005-06-24 22:33:21 +0000
committerJens Arnold <amiconn@rockbox.org>2005-06-24 22:33:21 +0000
commit04daef17a1d180c68888c29d11a1b9087e9ace32 (patch)
treef2d794c196981fc605880e3bbb4447edbaba5f50 /apps/recorder/widgets.c
parent0e935bdf01aff1e3bc66221c9a0fcc80f935c3d6 (diff)
First part of graphics api rework. Special functions, parameter handling, pixel functions, lines and filled primitives done for black & white core, main display.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6856 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/recorder/widgets.c')
-rw-r--r--apps/recorder/widgets.c24
1 files changed, 15 insertions, 9 deletions
diff --git a/apps/recorder/widgets.c b/apps/recorder/widgets.c
index 5c608bcb6b..09daf87fd3 100644
--- a/apps/recorder/widgets.c
+++ b/apps/recorder/widgets.c
@@ -54,14 +54,16 @@ void scrollbar(int x, int y, int width, int height, int items, int min_shown,
/* draw box */
lcd_drawrect(x, y, width, height);
+ lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
+
/* clear edge pixels */
- lcd_clearpixel(x, y);
- lcd_clearpixel((x + width - 1), y);
- lcd_clearpixel(x, (y + height - 1));
- lcd_clearpixel((x + width - 1), (y + height - 1));
+ lcd_drawpixel(x, y);
+ lcd_drawpixel((x + width - 1), y);
+ lcd_drawpixel(x, (y + height - 1));
+ lcd_drawpixel((x + width - 1), (y + height - 1));
/* clear pixels in progress bar */
- lcd_clearrect(x + 1, y + 1, width - 2, height - 2);
+ lcd_fillrect(x + 1, y + 1, width - 2, height - 2);
/* min should be min */
if(min_shown < max_shown) {
@@ -111,6 +113,8 @@ void scrollbar(int x, int y, int width, int height, int items, int min_shown,
size = 1;
}
+ lcd_set_drawmode(DRMODE_SOLID);
+
if(orientation == VERTICAL)
lcd_fillrect(x + 1, y + start + 1, width - 2, size);
else
@@ -133,11 +137,13 @@ void checkbox(int x, int y, int width, int height, bool checked)
lcd_drawrect(x, y, width, height);
if (checked){
- lcd_drawline(x + 2, y + 2, x + width - 2 - 1 , y + height - 2 - 1);
- lcd_drawline(x + 2, y + height - 2 - 1, x + width - 2 - 1, y + 2);
+ lcd_drawline(x + 2, y + 2, x + width - 2 - 1 , y + height - 2 - 1);
+ lcd_drawline(x + 2, y + height - 2 - 1, x + width - 2 - 1, y + 2);
} else {
- /* be sure to clear box */
- lcd_clearrect(x + 1, y + 1, width - 2, height - 2);
+ /* be sure to clear box */
+ lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
+ lcd_fillrect(x + 1, y + 1, width - 2, height - 2);
+ lcd_set_drawmode(DRMODE_SOLID);
}
}