32 #define swap(a, b) { int16_t t = a; a = b; b = t; }
51 GFX (
int width,
int height, uint8_t * screenBuffer,
const unsigned char * font);
66 virtual void setAddrWindow (uint8_t x0, uint8_t y0, uint8_t x1, uint8_t y1) = 0;
76 virtual void drawPixel (int16_t x, int16_t y, uint16_t color) = 0;
93 void drawChar (int16_t x, int16_t y, uint8_t data, uint16_t color, uint16_t bg, uint8_t size);
100 void print (std::string msg);
109 mraa_result_t
setPixel (
int x,
int y, uint16_t color);
127 void fillRect (int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color);
137 void drawFastVLine(int16_t x, int16_t y, int16_t h, uint16_t color);
148 void drawLine (int16_t x0, int16_t y0, int16_t x1, int16_t y1, uint16_t color);
161 void drawTriangle (int16_t x0, int16_t y0, int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint16_t color);
171 void drawCircle (int16_t x, int16_t y, int16_t r, uint16_t color);
187 void setTextColor (uint16_t textColor, uint16_t textBGColor);
215 const int16_t WIDTH, HEIGHT;
216 const unsigned char * m_font;
void drawLine(int16_t x0, int16_t y0, int16_t x1, int16_t y1, uint16_t color)
Definition: gfx.cxx:74
int m_textSize
Definition: gfx.h:205
void setTextWrap(uint8_t wrap)
Definition: gfx.cxx:174
int m_cursorY
Definition: gfx.h:209
int m_width
Definition: gfx.h:204
uint8_t * m_map
Definition: gfx.h:212
GFX helper class.
Definition: gfx.h:41
virtual void drawPixel(int16_t x, int16_t y, uint16_t color)=0
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:115
void drawChar(int16_t x, int16_t y, uint8_t data, uint16_t color, uint16_t bg, uint8_t size)
Definition: gfx.cxx:179
void fillScreen(uint16_t color)
Definition: gfx.cxx:57
~GFX()
Definition: gfx.cxx:40
int m_textBGColor
Definition: gfx.h:207
void setTextSize(uint8_t size)
Definition: gfx.cxx:169
int m_cursorX
Definition: gfx.h:208
void drawCircle(int16_t x, int16_t y, int16_t r, uint16_t color)
Definition: gfx.cxx:122
void setCursor(int16_t x, int16_t y)
Definition: gfx.cxx:157
int m_wrap
Definition: gfx.h:210
void drawFastVLine(int16_t x, int16_t y, int16_t h, uint16_t color)
Definition: gfx.cxx:69
int m_textColor
Definition: gfx.h:206
int m_height
Definition: gfx.h:203
void print(std::string msg)
Definition: gfx.cxx:213
GFX(int width, int height, uint8_t *screenBuffer, const unsigned char *font)
Definition: gfx.cxx:33
void setTextColor(uint16_t textColor, uint16_t textBGColor)
Definition: gfx.cxx:163
mraa_result_t setPixel(int x, int y, uint16_t color)
Definition: gfx.cxx:44
void fillRect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color)
Definition: gfx.cxx:62
virtual void setAddrWindow(uint8_t x0, uint8_t y0, uint8_t x1, uint8_t y1)=0