diff options
Diffstat (limited to 'firmware/drivers/lcd-16bit-vert.c')
-rw-r--r-- | firmware/drivers/lcd-16bit-vert.c | 112 |
1 files changed, 0 insertions, 112 deletions
diff --git a/firmware/drivers/lcd-16bit-vert.c b/firmware/drivers/lcd-16bit-vert.c index 2ebd6a366e..1222c12455 100644 --- a/firmware/drivers/lcd-16bit-vert.c +++ b/firmware/drivers/lcd-16bit-vert.c @@ -199,118 +199,6 @@ void lcd_vline(int x, int y1, int y2) } } -/* Fill a rectangular area */ -void lcd_fillrect(int x, int y, int width, int height) -{ - unsigned bits = 0; - enum fill_opt fillopt = OPT_NONE; - fb_data *dst, *dst_end; - - /******************** In viewport clipping **********************/ - /* nothing to draw? */ - if ((width <= 0) || (height <= 0) || (x >= current_vp->width) || - (y >= current_vp->height) || (x + width <= 0) || (y + height <= 0)) - return; - - if (x < 0) - { - width += x; - x = 0; - } - if (y < 0) - { - height += y; - y = 0; - } - if (x + width > current_vp->width) - width = current_vp->width - x; - if (y + height > current_vp->height) - height = current_vp->height - y; - - /* adjust for viewport */ - x += current_vp->x; - y += current_vp->y; - -#if defined(HAVE_VIEWPORT_CLIP) - /********************* Viewport on screen clipping ********************/ - /* nothing to draw? */ - if ((x >= LCD_WIDTH) || (y >= LCD_HEIGHT) - || (x + width <= 0) || (y + height <= 0)) - return; - - /* clip image in viewport in screen */ - if (x < 0) - { - width += x; - x = 0; - } - if (y < 0) - { - height += y; - y = 0; - } - if (x + width > LCD_WIDTH) - width = LCD_WIDTH - x; - if (y + height > LCD_HEIGHT) - height = LCD_HEIGHT - y; -#endif - - /* drawmode and optimisation */ - if (current_vp->drawmode & DRMODE_INVERSEVID) - { - if (current_vp->drawmode & DRMODE_BG) - { - if (!lcd_backdrop) - { - fillopt = OPT_SET; - bits = current_vp->bg_pattern; - } - else - fillopt = OPT_COPY; - } - } - else - { - if (current_vp->drawmode & DRMODE_FG) - { - fillopt = OPT_SET; - bits = current_vp->fg_pattern; - } - } - if (fillopt == OPT_NONE && current_vp->drawmode != DRMODE_COMPLEMENT) - return; - - dst = FBADDR(x, y); - dst_end = dst + width * LCD_HEIGHT; - - do - { - fb_data *dst_col, *col_end; - - switch (fillopt) - { - case OPT_SET: - memset16(dst, bits, height); - break; - - case OPT_COPY: - memcpy(dst, (void *)((long)dst + lcd_backdrop_offset), - height * sizeof(fb_data)); - break; - - case OPT_NONE: /* DRMODE_COMPLEMENT */ - dst_col = dst; - col_end = dst_col + height; - do - *dst_col = ~(*dst_col); - while (++dst_col < col_end); - break; - } - dst+=LCD_HEIGHT; - } - while (dst < dst_end); -} - /* Draw a partial native bitmap */ void ICODE_ATTR lcd_bitmap_part(const fb_data *src, int src_x, int src_y, int stride, int x, int y, int width, |