33 #define swap(a, b) { int16_t t = a; a = b; b = t; }
52 GFX (
int width,
int height, uint8_t * screenBuffer,
const unsigned char * font);
67 virtual void setAddrWindow (uint8_t x0, uint8_t y0, uint8_t x1, uint8_t y1) = 0;
77 virtual void drawPixel (int16_t x, int16_t y, uint16_t color) = 0;
94 void drawChar (int16_t x, int16_t y, uint8_t data, uint16_t color, uint16_t bg, uint8_t size);
101 void print (std::string msg);
110 mraa::Result
setPixel (
int x,
int y, uint16_t color);
128 void fillRect (int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color);
138 void drawFastVLine(int16_t x, int16_t y, int16_t h, uint16_t color);
149 void drawLine (int16_t x0, int16_t y0, int16_t x1, int16_t y1, uint16_t color);
162 void drawTriangle (int16_t x0, int16_t y0, int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint16_t color);
172 void drawCircle (int16_t x, int16_t y, int16_t r, uint16_t color);
188 void setTextColor (uint16_t textColor, uint16_t textBGColor);
216 const int16_t WIDTH, HEIGHT;
217 const unsigned char * m_font;
virtual void drawLine(int16_t x0, int16_t y0, int16_t x1, int16_t y1, uint16_t color)
Definition: gfx.cxx:45
int m_textSize
Definition: gfx.h:206
void setTextSize(uint8_t s)
Definition: gfx.cxx:426
int m_cursorY
Definition: gfx.h:210
int m_width
Definition: gfx.h:205
void setTextWrap(bool w)
Definition: gfx.cxx:430
uint8_t * m_map
Definition: gfx.h:213
virtual void drawPixel(int16_t x, int16_t y, uint16_t color)=0
int16_t height(void) const
Definition: gfx.cxx:488
void drawTriangle(int16_t x0, int16_t y0, int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint16_t color)
Definition: gfx.cxx:242
virtual void fillScreen(uint16_t color)
Definition: gfx.cxx:124
~GFX()
Definition: gfx.cxx:40
void setTextColor(uint16_t c)
Definition: gfx.cxx:415
GFX(int16_t w, int16_t h)
Definition: gfx.cxx:31
int m_textBGColor
Definition: gfx.h:208
int m_cursorX
Definition: gfx.h:209
void setCursor(int16_t x, int16_t y)
Definition: gfx.cxx:410
int m_wrap
Definition: gfx.h:211
virtual void drawFastVLine(int16_t x, int16_t y, int16_t h, uint16_t color)
Definition: gfx.cxx:89
int m_textColor
Definition: gfx.h:207
void drawChar(int16_t x, int16_t y, unsigned char c, uint16_t color, uint16_t bg, uint8_t size)
Definition: gfx.cxx:371
mraa::Result setPixel(int x, int y, uint16_t color)
Definition: gfx.cxx:44
int m_height
Definition: gfx.h:204
void print(std::string msg)
Definition: gfx.cxx:477
int16_t width(void) const
Definition: gfx.cxx:484
void drawCircle(int16_t x0, int16_t y0, int16_t r, uint16_t color)
Definition: gfx.cxx:132
virtual void fillRect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color)
Definition: gfx.cxx:114
virtual void setAddrWindow(uint8_t x0, uint8_t y0, uint8_t x1, uint8_t y1)=0