summaryrefslogtreecommitdiff
path: root/apps/gui/icon.c
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2011-11-08 21:34:46 +0000
committerThomas Martitz <kugel@rockbox.org>2011-11-08 21:34:46 +0000
commit13209604c1512658e729d0bd9f1c54cf3e53568d (patch)
tree2787f9036b5c40cf79cd324f3d215bb9d48dd34a /apps/gui/icon.c
parent6223ad266e556f5b8d749d5f4fe08e27385be66f (diff)
downloadrockbox-13209604c1512658e729d0bd9f1c54cf3e53568d.zip
rockbox-13209604c1512658e729d0bd9f1c54cf3e53568d.tar.gz
rockbox-13209604c1512658e729d0bd9f1c54cf3e53568d.tar.bz2
rockbox-13209604c1512658e729d0bd9f1c54cf3e53568d.tar.xz
Add new lcd_bmp and lcd_bmp_part APIs.
This new APIs wrap around lcd_[mono|transparent]_bitmap/_part calls and handle all kinds bitmaps. The intended use is to draw bitmaps that come from read_bmp_fd/_file. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30936 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/icon.c')
-rw-r--r--apps/gui/icon.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/apps/gui/icon.c b/apps/gui/icon.c
index c171da5..4c006f9 100644
--- a/apps/gui/icon.c
+++ b/apps/gui/icon.c
@@ -109,14 +109,11 @@ void screen_put_icon_with_offset(struct screen * display,
void screen_put_iconxy(struct screen * display,
int xpos, int ypos, enum themable_icons icon)
{
- const void *data;
const int screen = display->screen_type;
const int width = ICON_WIDTH(screen);
const int height = ICON_HEIGHT(screen);
const int is_rtl = lang_is_rtl();
- int stride;
const struct bitmap *iconset;
- screen_bitmap_part_func *draw_func = NULL;
if (icon == Icon_NOICON)
{
@@ -145,9 +142,6 @@ void screen_put_iconxy(struct screen * display,
{
iconset = &inbuilt_iconset[screen];
}
- data = iconset->data;
- stride = STRIDE(display->screen_type, iconset->width, iconset->height);
-
/* add some left padding to the icons if they are on the edge */
if (xpos == 0)
xpos++;
@@ -155,14 +149,8 @@ void screen_put_iconxy(struct screen * display,
if (is_rtl)
xpos = display->getwidth() - xpos - width;
-#if (LCD_DEPTH == 16) || defined(LCD_REMOTE_DEPTH) && (LCD_REMOTE_DEPTH == 16)
- if (display->depth == 16)
- draw_func = display->transparent_bitmap_part;
- else
-#endif
- draw_func = display->bitmap_part;
- draw_func(data, 0, height * icon, stride, xpos, ypos, width, height);
+ display->bmp_part(iconset, 0, height * icon, xpos, ypos, width, height);
}
void screen_put_cursorxy(struct screen * display, int x, int y, bool on)