Guest User

Untitled

a guest
Nov 21st, 2016
19
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. static struct viewport clip_rect;
  3. static bool clipped = false;
  4.  
  5. static void rb_clip(void *handle, int x, int y, int w, int h)
  6. {
  7. LOGF("rb_clip(%d %d %d %d)", x, y, w, h);
  8. clip_rect.x = x;
  9. clip_rect.y = y;
  10. clip_rect.width = w;
  11. clip_rect.height = h;
  12. clip_rect.font = FONT_UI;
  13. clip_rect.drawmode = DRMODE_SOLID;
  14. #if LCD_DEPTH > 1
  15. clip_rect.fg_pattern = LCD_DEFAULT_FG;
  16. clip_rect.bg_pattern = LCD_DEFAULT_BG;
  17. #endif
  18. rb->lcd_set_viewport(NULL);
  19. rb->lcd_set_viewport(&clip_rect);
  20. clipped = true;
  21. }
  22.  
  23. static void rb_unclip(void *handle)
  24. {
  25. LOGF("rb_unclip");
  26. rb->lcd_set_viewport(NULL);
  27. clipped = false;
  28. }
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×