summaryrefslogtreecommitdiff
path: root/firmware/drivers/lcd-bitmap-common.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/drivers/lcd-bitmap-common.c')
-rw-r--r--firmware/drivers/lcd-bitmap-common.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/firmware/drivers/lcd-bitmap-common.c b/firmware/drivers/lcd-bitmap-common.c
index 878c08863b..3aa833d6a1 100644
--- a/firmware/drivers/lcd-bitmap-common.c
+++ b/firmware/drivers/lcd-bitmap-common.c
@@ -501,3 +501,29 @@ void LCDFN(puts_scroll_style_offset)(int x, int y, const unsigned char *string,
501{ 501{
502 LCDFN(puts_scroll_style_xyoffset)(x, y, string, style, x_offset, 0); 502 LCDFN(puts_scroll_style_xyoffset)(x, y, string, style, x_offset, 0);
503} 503}
504
505#if !defined(HAVE_LCD_COLOR) || !defined(MAIN_LCD)
506/* see lcd-16bit-common.c for others */
507#ifdef MAIN_LCD
508#define THIS_STRIDE STRIDE_MAIN
509#else
510#define THIS_STRIDE STRIDE_REMOTE
511#endif
512
513void LCDFN(bmp_part)(const struct bitmap* bm, int src_x, int src_y,
514 int x, int y, int width, int height)
515{
516 if (bm->format == FORMAT_MONO)
517 LCDFN(mono_bitmap_part)((FBFN(data)*)(bm->data),
518 src_x, src_y, THIS_STRIDE(bm->width, bm->height), x, y, width, height);
519 else
520 LCDFN(bitmap_part)((FBFN(data)*)(bm->data),
521 src_x, src_y, THIS_STRIDE(bm->width, bm->height), x, y, width, height);
522}
523
524void LCDFN(bmp)(const struct bitmap* bm, int x, int y)
525{
526 LCDFN(bmp_part)(bm, 0, 0, x, y, bm->width, bm->height);
527}
528
529#endif