1 #ifndef _ADAFRUIT_GFX_H 2 #define _ADAFRUIT_GFX_H 21 virtual void drawPixel(int16_t
x, int16_t y, uint16_t color) = 0;
26 drawLine(int16_t x0, int16_t y0, int16_t x1, int16_t y1, uint16_t color),
27 drawFastVLine(int16_t x, int16_t y, int16_t h, uint16_t color),
28 drawFastHLine(int16_t x, int16_t y, int16_t w, uint16_t color),
29 drawRect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color),
30 fillRect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color),
36 drawCircle(int16_t x0, int16_t y0, int16_t r, uint16_t color),
39 fillCircle(int16_t x0, int16_t y0, int16_t r, uint16_t color),
41 int16_t delta, uint16_t color),
42 drawTriangle(int16_t x0, int16_t y0, int16_t x1, int16_t y1,
43 int16_t x2, int16_t y2, uint16_t color),
44 fillTriangle(int16_t x0, int16_t y0, int16_t x1, int16_t y1,
45 int16_t x2, int16_t y2, uint16_t color),
47 int16_t radius, uint16_t color),
49 int16_t radius, uint16_t color),
50 drawBitmap(int16_t x, int16_t y,
const uint8_t *bitmap,
51 int16_t w, int16_t h, uint16_t color),
52 drawBitmap(int16_t x, int16_t y,
const uint8_t *bitmap,
53 int16_t w, int16_t h, uint16_t color, uint16_t bg),
54 drawBitmap(int16_t x, int16_t y, uint8_t *bitmap,
55 int16_t w, int16_t h, uint16_t color),
56 drawBitmap(int16_t x, int16_t y, uint8_t *bitmap,
57 int16_t w, int16_t h, uint16_t color, uint16_t bg),
58 drawXBitmap(int16_t x, int16_t y,
const uint8_t *bitmap,
59 int16_t w, int16_t h, uint16_t color),
60 drawChar(int16_t x, int16_t y,
unsigned char c, uint16_t color,
61 uint16_t bg, uint8_t size),
68 cp437(
boolean x=
true),
71 int16_t *x1, int16_t *y1, uint16_t *w, uint16_t *h),
72 getTextBounds(
const __FlashStringHelper *s, int16_t x, int16_t y,
73 int16_t *x1, int16_t *y1, uint16_t *w, uint16_t *h);
76 virtual size_t write(uint8_t);
78 virtual void write(uint8_t);
81 int16_t
height(
void)
const;
82 int16_t
width(
void)
const;
114 uint8_t w, uint8_t h, uint16_t outline, uint16_t fill,
116 void drawButton(
boolean inverted =
false);
117 boolean contains(int16_t x, int16_t y);
119 void press(
boolean p);
121 boolean justPressed();
122 boolean justReleased();
129 uint16_t _outlinecolor, _fillcolor, _textcolor;
132 boolean currstate, laststate;
141 void drawPixel(int16_t
x, int16_t y, uint16_t color),
143 uint8_t *getBuffer(
void);
152 void drawPixel(int16_t
x, int16_t y, uint16_t color),
154 uint16_t *getBuffer(
void);
159 #endif // _ADAFRUIT_GFX_H void drawBitmap(int16_t x, int16_t y, const uint8_t *bitmap, int16_t w, int16_t h, uint16_t color)
virtual void drawRect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color)
virtual void invertDisplay(boolean i)
int16_t height(void) const
void setFont(const GFXfont *f=NULL)
void fillRoundRect(int16_t x0, int16_t y0, int16_t w, int16_t h, int16_t radius, uint16_t color)
int16_t getCursorY(void) const
void drawRoundRect(int16_t x0, int16_t y0, int16_t w, int16_t h, int16_t radius, uint16_t color)
void drawTriangle(int16_t x0, int16_t y0, int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint16_t color)
void setCursor(int16_t x, int16_t y)
void fillTriangle(int16_t x0, int16_t y0, int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint16_t color)
int16_t width(void) const
int16_t getCursorX(void) const
virtual void drawPixel(int16_t x, int16_t y, uint16_t color)=0
void drawXBitmap(int16_t x, int16_t y, const uint8_t *bitmap, int16_t w, int16_t h, uint16_t color)
void drawCircleHelper(int16_t x0, int16_t y0, int16_t r, uint8_t cornername, uint16_t color)
virtual void fillRect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color)
void fillCircleHelper(int16_t x0, int16_t y0, int16_t r, uint8_t cornername, int16_t delta, uint16_t color)
void getTextBounds(char *string, int16_t x, int16_t y, int16_t *x1, int16_t *y1, uint16_t *w, uint16_t *h)
void setTextColor(uint16_t c)
virtual void fillScreen(uint16_t color)
virtual void write(uint8_t)
void cp437(boolean x=true)
uint8_t getRotation(void) const
virtual void drawLine(int16_t x0, int16_t y0, int16_t x1, int16_t y1, uint16_t color)
void drawChar(int16_t x, int16_t y, unsigned char c, uint16_t color, uint16_t bg, uint8_t size)
void drawCircle(int16_t x0, int16_t y0, int16_t r, uint16_t color)
virtual void drawFastHLine(int16_t x, int16_t y, int16_t w, uint16_t color)
void fillCircle(int16_t x0, int16_t y0, int16_t r, uint16_t color)
void setTextWrap(boolean w)
void setTextSize(uint8_t s)
Adafruit_GFX(int16_t w, int16_t h)
void setRotation(uint8_t r)
virtual void drawFastVLine(int16_t x, int16_t y, int16_t h, uint16_t color)