summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorKarl Kurbjun <kkurbjun@gmail.com>2009-08-29 19:31:29 +0000
committerKarl Kurbjun <kkurbjun@gmail.com>2009-08-29 19:31:29 +0000
commit7bb7c5f0cc7bf5b5172aeb4d75ef886b19755863 (patch)
tree2ebcd796b8e4af00759bd87180b55542598a247b /apps
parent47541e5f2f862a7a2dd314882dc9de068dc83102 (diff)
downloadrockbox-7bb7c5f0cc7bf5b5172aeb4d75ef886b19755863.zip
rockbox-7bb7c5f0cc7bf5b5172aeb4d75ef886b19755863.tar.gz
rockbox-7bb7c5f0cc7bf5b5172aeb4d75ef886b19755863.tar.bz2
rockbox-7bb7c5f0cc7bf5b5172aeb4d75ef886b19755863.tar.xz
Add stride defines to support vertical strides
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22546 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/gui/icon.c18
-rw-r--r--apps/gui/scrollbar.c6
-rw-r--r--apps/gui/skin_engine/skin_display.c4
3 files changed, 18 insertions, 10 deletions
diff --git a/apps/gui/icon.c b/apps/gui/icon.c
index 6a5ff70..74af4a0 100644
--- a/apps/gui/icon.c
+++ b/apps/gui/icon.c
@@ -124,6 +124,7 @@ void screen_put_iconxy(struct screen * display,
int screen = display->screen_type;
int width = ICON_WIDTH(screen);
int height = ICON_HEIGHT(screen);
+ int stride;
screen_bitmap_part_func *draw_func = NULL;
if (icon == Icon_NOICON)
@@ -142,15 +143,20 @@ void screen_put_iconxy(struct screen * display,
screen_put_iconxy(display, xpos, ypos, Icon_Questionmark);
return;
}
- data = viewer_iconset[screen].data;
+ data = viewer_iconset[screen].data;
+ stride = STRIDE( viewer_iconset[screen].width,
+ viewer_iconset[screen].height);
}
else if (custom_icons_loaded[screen])
{
- data = user_iconset[screen].data;
+ data = user_iconset[screen].data;
+ stride = STRIDE( user_iconset[screen].width,
+ user_iconset[screen].height);
}
else
{
- data = inbuilt_icons[screen];
+ data = inbuilt_icons[screen];
+ stride = STRIDE(BMPWIDTH_default_icons, BMPHEIGHT_default_icons);
}
/* add some left padding to the icons if they are on the edge */
if (xpos == 0)
@@ -158,12 +164,12 @@ void screen_put_iconxy(struct screen * display,
#if (LCD_DEPTH == 16) || defined(LCD_REMOTE_DEPTH) && (LCD_REMOTE_DEPTH == 16)
if (display->depth == 16)
- draw_func = display->transparent_bitmap_part;
+ draw_func = display->transparent_bitmap_part;
else
#endif
- draw_func = display->bitmap_part;
+ draw_func = display->bitmap_part;
- draw_func(data, 0, height * icon, width, xpos, ypos, width, height);
+ draw_func(data, 0, height * icon, stride, xpos, ypos, width, height);
}
void screen_put_cursorxy(struct screen * display, int x, int y, bool on)
diff --git a/apps/gui/scrollbar.c b/apps/gui/scrollbar.c
index 0f2a485..193bb4b 100644
--- a/apps/gui/scrollbar.c
+++ b/apps/gui/scrollbar.c
@@ -202,7 +202,8 @@ void gui_bitmap_scrollbar_draw(struct screen * screen, struct bitmap bm, int x,
#if LCD_DEPTH > 1
else
screen->transparent_bitmap_part((fb_data *)bm.data, 0, 0,
- bm.width, x + start, y, size, height);
+ STRIDE(bm.width, bm.height),
+ x + start, y, size, height);
#endif
} else {
#if LCD_DEPTH > 1
@@ -213,7 +214,8 @@ void gui_bitmap_scrollbar_draw(struct screen * screen, struct bitmap bm, int x,
#if LCD_DEPTH > 1
else
screen->transparent_bitmap_part((fb_data *)bm.data, 0, 0,
- bm.width, x, y + start, width, size);
+ STRIDE(bm.width, bm.height),
+ x, y + start, width, size);
#endif
}
}
diff --git a/apps/gui/skin_engine/skin_display.c b/apps/gui/skin_engine/skin_display.c
index a6cab63..4099844 100644
--- a/apps/gui/skin_engine/skin_display.c
+++ b/apps/gui/skin_engine/skin_display.c
@@ -232,8 +232,8 @@ static void wps_draw_image(struct gui_wps *gwps, struct gui_img *img, int subima
} else {
display->transparent_bitmap_part((fb_data *)img->bm.data,
0, img->subimage_height * subimage,
- img->bm.width, img->x,
- img->y, img->bm.width,
+ STRIDE(img->bm.width, img->bm.height),
+ img->x, img->y, img->bm.width,
img->subimage_height);
}
#endif