RenderBuffer.h 1.0 KB

123456789101112131415161718192021222324252627282930
  1. #pragma once
  2. #include "Buffer.h"
  3. #include <gui/gui.h>
  4. struct Vector;
  5. class Sprite;
  6. class RenderBuffer : public Buffer {
  7. void draw_sprite(Sprite *const sprite, bool is_black,
  8. PixelColor draw_color, const Vector& position, uint8_t x_cap, uint8_t y_cap, float rotation);
  9. public:
  10. explicit RenderBuffer(uint8_t w, uint8_t h);
  11. virtual ~RenderBuffer();
  12. void render(Canvas *const canvas);
  13. void reset();
  14. void draw_line(int x0, int y0, int x1, int y1, PixelColor draw_mode);
  15. void draw_rbox(int16_t x0, int16_t y0, int16_t x1, int16_t y1, PixelColor draw_mode);
  16. void draw_box(int16_t x0, int16_t y0, int16_t x1, int16_t y1, PixelColor draw_mode);
  17. void draw_rbox_frame(int16_t x0, int16_t y0, int16_t x1, int16_t y1, PixelColor draw_mode);
  18. void draw_circle(int x, int y, int r, PixelColor draw_mode);
  19. void draw(Sprite *const sprite, Vector position, uint8_t x_cap, uint8_t y_cap, float rotation);
  20. void draw(Sprite *const sprite, Vector position, float rotation);
  21. };