summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2006-01-28 23:12:20 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2006-01-28 23:12:20 +0000
commit281403a4d839924df41480fc020f401211a6e88b (patch)
treea9465e88b9f0c660f2080578d1839bd5f4d2ddc7 /apps
parent5947e49f467cdf3cf5d2acfcc3c0bd6f97ab29f7 (diff)
downloadrockbox-281403a4d839924df41480fc020f401211a6e88b.tar.gz
rockbox-281403a4d839924df41480fc020f401211a6e88b.tar.bz2
rockbox-281403a4d839924df41480fc020f401211a6e88b.zip
Work-in-progress transparent bitmaps with 255,0,255 as the transparent color, not yet working on the H100 series
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8476 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/gui/gwps-common.c9
-rw-r--r--apps/screen_access.c6
-rw-r--r--apps/screen_access.h2
3 files changed, 13 insertions, 4 deletions
diff --git a/apps/gui/gwps-common.c b/apps/gui/gwps-common.c
index d15dbba888..b32deba479 100644
--- a/apps/gui/gwps-common.c
+++ b/apps/gui/gwps-common.c
@@ -219,7 +219,7 @@ bool wps_data_preload_tags(struct wps_data *data, char *buf,
data->img[n].bm.data = data->img_buf_ptr;
ret = read_bmp_file(imgname, &data->img[n].bm,
data->img_buf_free,
- FORMAT_ANY);
+ FORMAT_ANY|FORMAT_TRANSPARENT);
if (ret > 0)
{
data->img_buf_ptr += ret;
@@ -1252,9 +1252,10 @@ static void wps_draw_image(struct gui_wps *gwps, int n)
data->img[n].bm.height);
#if LCD_DEPTH > 1
} else {
- display->bitmap((fb_data *)data->img[n].bm.data, data->img[n].x,
- data->img[n].y, data->img[n].bm.width,
- data->img[n].bm.height);
+ display->transparent_bitmap((fb_data *)data->img[n].bm.data,
+ data->img[n].x,
+ data->img[n].y, data->img[n].bm.width,
+ data->img[n].bm.height);
}
#endif
}
diff --git a/apps/screen_access.c b/apps/screen_access.c
index 8f7f5c5aae..d38f1ca6a9 100644
--- a/apps/screen_access.c
+++ b/apps/screen_access.c
@@ -121,6 +121,12 @@ void screen_init(struct screen * screen, enum screen_type screen_type)
screen->set_drawmode=&lcd_set_drawmode;
#if LCD_DEPTH > 1
screen->bitmap=&lcd_bitmap;
+#if LCD_DEPTH == 2
+ /* No transparency yet for grayscale lcd */
+ screen->transparent_bitmap=&lcd_bitmap;
+#else
+ screen->transparent_bitmap=&lcd_bitmap_transparent;
+#endif
screen->set_background=&lcd_set_background;
#endif
screen->update_rect=&lcd_update_rect;
diff --git a/apps/screen_access.h b/apps/screen_access.h
index af52527fc0..3664ecb13d 100644
--- a/apps/screen_access.h
+++ b/apps/screen_access.h
@@ -84,6 +84,8 @@ struct screen
int x, int y, int width, int height);
void (*bitmap)(const fb_data *src,
int x, int y, int width, int height);
+ void (*transparent_bitmap)(const fb_data *src,
+ int x, int y, int width, int height);
void (*set_drawmode)(int mode);
#if (LCD_DEPTH > 1) || (LCD_REMOTE_DEPTH > 1)
void (*set_background)(unsigned background);