1 #ifndef _ADAFRUIT_GFX_H
2 #define _ADAFRUIT_GFX_H
20 virtual void drawPixel(int16_t x, int16_t y, uint16_t color) = 0;
25 virtual void startWrite(
void);
26 virtual void writePixel(int16_t x, int16_t y, uint16_t color);
27 virtual void writeFillRect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color);
28 virtual void writeFastVLine(int16_t x, int16_t y, int16_t h, uint16_t color);
29 virtual void writeFastHLine(int16_t x, int16_t y, int16_t w, uint16_t color);
30 virtual void writeLine(int16_t x0, int16_t y0, int16_t x1, int16_t y1, uint16_t color);
31 virtual void endWrite(
void);
36 virtual void setRotation(uint8_t r);
37 virtual void invertDisplay(
boolean i);
44 drawFastVLine(int16_t x, int16_t y, int16_t h, uint16_t color),
45 drawFastHLine(int16_t x, int16_t y, int16_t w, uint16_t color),
46 fillRect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color),
47 fillScreen(uint16_t color),
49 drawLine(int16_t x0, int16_t y0, int16_t x1, int16_t y1, uint16_t color),
50 drawRect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color);
54 drawCircle(int16_t x0, int16_t y0, int16_t r, uint16_t color),
55 drawCircleHelper(int16_t x0, int16_t y0, int16_t r, uint8_t cornername,
57 fillCircle(int16_t x0, int16_t y0, int16_t r, uint16_t color),
58 fillCircleHelper(int16_t x0, int16_t y0, int16_t r, uint8_t cornername,
59 int16_t delta, uint16_t color),
60 drawTriangle(int16_t x0, int16_t y0, int16_t x1, int16_t y1,
61 int16_t x2, int16_t y2, uint16_t color),
62 fillTriangle(int16_t x0, int16_t y0, int16_t x1, int16_t y1,
63 int16_t x2, int16_t y2, uint16_t color),
64 drawRoundRect(int16_t x0, int16_t y0, int16_t w, int16_t h,
65 int16_t radius, uint16_t color),
66 fillRoundRect(int16_t x0, int16_t y0, int16_t w, int16_t h,
67 int16_t radius, uint16_t color),
68 drawBitmap(int16_t x, int16_t y,
const uint8_t bitmap[],
69 int16_t w, int16_t h, uint16_t color),
70 drawBitmap(int16_t x, int16_t y,
const uint8_t bitmap[],
71 int16_t w, int16_t h, uint16_t color, uint16_t bg),
72 drawBitmap(int16_t x, int16_t y, uint8_t *bitmap,
73 int16_t w, int16_t h, uint16_t color),
74 drawBitmap(int16_t x, int16_t y, uint8_t *bitmap,
75 int16_t w, int16_t h, uint16_t color, uint16_t bg),
76 drawXBitmap(int16_t x, int16_t y,
const uint8_t bitmap[],
77 int16_t w, int16_t h, uint16_t color),
78 drawGrayscaleBitmap(int16_t x, int16_t y,
const uint8_t bitmap[],
79 int16_t w, int16_t h),
80 drawGrayscaleBitmap(int16_t x, int16_t y, uint8_t *bitmap,
81 int16_t w, int16_t h),
82 drawGrayscaleBitmap(int16_t x, int16_t y,
83 const uint8_t bitmap[],
const uint8_t mask[],
84 int16_t w, int16_t h),
85 drawGrayscaleBitmap(int16_t x, int16_t y,
86 uint8_t *bitmap, uint8_t *mask, int16_t w, int16_t h),
87 drawRGBBitmap(int16_t x, int16_t y,
const uint16_t bitmap[],
88 int16_t w, int16_t h),
89 drawRGBBitmap(int16_t x, int16_t y, uint16_t *bitmap,
90 int16_t w, int16_t h),
91 drawRGBBitmap(int16_t x, int16_t y,
92 const uint16_t bitmap[],
const uint8_t mask[],
93 int16_t w, int16_t h),
94 drawRGBBitmap(int16_t x, int16_t y,
95 uint16_t *bitmap, uint8_t *mask, int16_t w, int16_t h),
96 drawChar(int16_t x, int16_t y,
unsigned char c, uint16_t color,
97 uint16_t bg, uint8_t size),
98 setCursor(int16_t x, int16_t y),
99 setTextColor(uint16_t c),
100 setTextColor(uint16_t c, uint16_t bg),
101 setTextSize(uint8_t s),
102 setTextWrap(
boolean w),
103 cp437(
boolean x=
true),
104 setFont(
const GFXfont *f = NULL),
105 getTextBounds(
char *
string, int16_t x, int16_t y,
106 int16_t *x1, int16_t *y1, uint16_t *w, uint16_t *h),
107 getTextBounds(
const __FlashStringHelper *s, int16_t x, int16_t y,
108 int16_t *x1, int16_t *y1, uint16_t *w, uint16_t *h);
111 virtual size_t write(uint8_t);
113 virtual void write(uint8_t);
116 int16_t height(
void)
const;
117 int16_t width(
void)
const;
119 uint8_t getRotation(
void)
const;
122 int16_t getCursorX(
void)
const;
123 int16_t getCursorY(
void)
const;
127 charBounds(
char c, int16_t *x, int16_t *y,
128 int16_t *minx, int16_t *miny, int16_t *maxx, int16_t *maxy);
135 textcolor, textbgcolor;
151 void initButton(
Adafruit_GFX *gfx, int16_t x, int16_t y,
152 uint16_t w, uint16_t h, uint16_t outline, uint16_t fill,
153 uint16_t textcolor,
char *label, uint8_t textsize);
155 void initButtonUL(
Adafruit_GFX *gfx, int16_t x1, int16_t y1,
156 uint16_t w, uint16_t h, uint16_t outline, uint16_t fill,
157 uint16_t textcolor,
char *label, uint8_t textsize);
158 void drawButton(
boolean inverted =
false);
159 boolean contains(int16_t x, int16_t y);
161 void press(
boolean p);
163 boolean justPressed();
164 boolean justReleased();
171 uint16_t _outlinecolor, _fillcolor, _textcolor;
174 boolean currstate, laststate;
181 void drawPixel(int16_t x, int16_t y, uint16_t color),
182 fillScreen(uint16_t color);
183 uint8_t *getBuffer(
void);
192 void drawPixel(int16_t x, int16_t y, uint16_t color),
193 fillScreen(uint16_t color),
194 writeFastHLine(int16_t x, int16_t y, int16_t w, uint16_t color);
196 uint8_t *getBuffer(
void);
205 void drawPixel(int16_t x, int16_t y, uint16_t color),
206 fillScreen(uint16_t color);
207 uint16_t *getBuffer(
void);
212 #endif // _ADAFRUIT_GFX_H
Definition: Adafruit_GFX.h:201
Definition: Adafruit_GFX.h:188
Definition: Adafruit_GFX.h:12
Definition: Adafruit_GFX.h:177