Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static struct viewport clip_rect;
- static bool clipped = false;
- static void rb_clip(void *handle, int x, int y, int w, int h)
- {
- LOGF("rb_clip(%d %d %d %d)", x, y, w, h);
- clip_rect.x = x;
- clip_rect.y = y;
- clip_rect.width = w;
- clip_rect.height = h;
- clip_rect.font = FONT_UI;
- clip_rect.drawmode = DRMODE_SOLID;
- #if LCD_DEPTH > 1
- clip_rect.fg_pattern = LCD_DEFAULT_FG;
- clip_rect.bg_pattern = LCD_DEFAULT_BG;
- #endif
- rb->lcd_set_viewport(NULL);
- rb->lcd_set_viewport(&clip_rect);
- clipped = true;
- }
- static void rb_unclip(void *handle)
- {
- LOGF("rb_unclip");
- rb->lcd_set_viewport(NULL);
- clipped = false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement