diff options
author | Robert Hak <adiamas@rockbox.org> | 2002-05-03 06:23:30 +0000 |
---|---|---|
committer | Robert Hak <adiamas@rockbox.org> | 2002-05-03 06:23:30 +0000 |
commit | 1118c88639b2d7ad9c781a9aa296809a5b47dea7 (patch) | |
tree | 26866e56c9ab1131f8ee87349836fd9675885dbd /firmware/drivers | |
parent | 0e747f18bc6b6a35771c13abc75b01363f19786e (diff) |
lcd_drawrect added
I was tired of calling lcd_drawline 4 times on my own. This acts
as a wrapper around that.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@399 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers')
-rw-r--r-- | firmware/drivers/lcd.c | 13 | ||||
-rw-r--r-- | firmware/drivers/lcd.h | 1 |
2 files changed, 14 insertions, 0 deletions
diff --git a/firmware/drivers/lcd.c b/firmware/drivers/lcd.c index 8a6207bc87..6df3f28ffd 100644 --- a/firmware/drivers/lcd.c +++ b/firmware/drivers/lcd.c @@ -540,6 +540,19 @@ void lcd_bitmap (unsigned char *src, int x, int y, int nx, int ny, } } +/* + * Draw a rectangle with point a (upper left) at (x, y) + * and size (nx, ny) + */ +void lcd_drawrect (int x, int y, int nx, int ny) +{ + lcd_drawline(x, y, nx, y); + lcd_drawline(x, ny, nx, ny); + + lcd_drawline(x, y, x, ny); + lcd_drawline(nx, y, nx, ny); +} + /* * Clear a rectangular area at (x, y), size (nx, ny) */ diff --git a/firmware/drivers/lcd.h b/firmware/drivers/lcd.h index 3694ac72a9..7e0495cd99 100644 --- a/firmware/drivers/lcd.h +++ b/firmware/drivers/lcd.h @@ -74,6 +74,7 @@ extern void lcd_bitmap (unsigned char *src, int x, int y, int nx, int ny, bool clear); extern void lcd_clearrect (int x, int y, int nx, int ny); extern void lcd_fillrect (int x, int y, int nx, int ny); +extern void lcd_drawrect (int x, int y, int nx, int ny); extern void lcd_invertrect (int x, int y, int nx, int ny); extern void lcd_drawline( int x1, int y1, int x2, int y2 ); extern void lcd_drawpixel(int x, int y); |