From 13209604c1512658e729d0bd9f1c54cf3e53568d Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Tue, 8 Nov 2011 21:34:46 +0000 Subject: 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 --- apps/gui/icon.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'apps/gui/icon.c') diff --git a/apps/gui/icon.c b/apps/gui/icon.c index c171da5b44..4c006f947a 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) -- cgit v1.2.3