1 #ifndef _ADAFRUIT_GFX_H 2 #define _ADAFRUIT_GFX_H 29 virtual void drawPixel(int16_t x, int16_t y, uint16_t color) = 0;
35 virtual void writePixel(int16_t x, int16_t y, uint16_t color);
36 virtual void writeFillRect(int16_t x, int16_t y, int16_t w, int16_t h,
38 virtual void writeFastVLine(int16_t x, int16_t y, int16_t h, uint16_t color);
39 virtual void writeFastHLine(int16_t x, int16_t y, int16_t w, uint16_t color);
40 virtual void writeLine(int16_t x0, int16_t y0, int16_t x1, int16_t y1,
55 virtual void drawFastVLine(int16_t x, int16_t y, int16_t h, uint16_t color);
56 virtual void drawFastHLine(int16_t x, int16_t y, int16_t w, uint16_t color);
57 virtual void fillRect(int16_t x, int16_t y, int16_t w, int16_t h,
61 virtual void drawLine(int16_t x0, int16_t y0, int16_t x1, int16_t y1,
63 virtual void drawRect(int16_t x, int16_t y, int16_t w, int16_t h,
67 void drawCircle(int16_t x0, int16_t y0, int16_t r, uint16_t color);
70 void fillCircle(int16_t x0, int16_t y0, int16_t r, uint16_t color);
72 int16_t delta, uint16_t color);
73 void drawTriangle(int16_t x0, int16_t y0, int16_t x1, int16_t y1, int16_t x2,
74 int16_t y2, uint16_t color);
75 void fillTriangle(int16_t x0, int16_t y0, int16_t x1, int16_t y1, int16_t x2,
76 int16_t y2, uint16_t color);
77 void drawRoundRect(int16_t x0, int16_t y0, int16_t w, int16_t h,
78 int16_t radius, uint16_t color);
79 void fillRoundRect(int16_t x0, int16_t y0, int16_t w, int16_t h,
80 int16_t radius, uint16_t color);
81 void drawBitmap(int16_t x, int16_t y,
const uint8_t bitmap[], int16_t w,
82 int16_t h, uint16_t color);
83 void drawBitmap(int16_t x, int16_t y,
const uint8_t bitmap[], int16_t w,
84 int16_t h, uint16_t color, uint16_t bg);
85 void drawBitmap(int16_t x, int16_t y, uint8_t *bitmap, int16_t w, int16_t h,
87 void drawBitmap(int16_t x, int16_t y, uint8_t *bitmap, int16_t w, int16_t h,
88 uint16_t color, uint16_t bg);
89 void drawXBitmap(int16_t x, int16_t y,
const uint8_t bitmap[], int16_t w,
90 int16_t h, uint16_t color);
92 int16_t w, int16_t h);
96 const uint8_t mask[], int16_t w, int16_t h);
98 int16_t w, int16_t h);
99 void drawRGBBitmap(int16_t x, int16_t y,
const uint16_t bitmap[], int16_t w,
101 void drawRGBBitmap(int16_t x, int16_t y, uint16_t *bitmap, int16_t w,
103 void drawRGBBitmap(int16_t x, int16_t y,
const uint16_t bitmap[],
104 const uint8_t mask[], int16_t w, int16_t h);
105 void drawRGBBitmap(int16_t x, int16_t y, uint16_t *bitmap, uint8_t *mask,
106 int16_t w, int16_t h);
107 void drawChar(int16_t x, int16_t y,
unsigned char c, uint16_t color,
108 uint16_t bg, uint8_t size);
109 void drawChar(int16_t x, int16_t y,
unsigned char c, uint16_t color,
110 uint16_t bg, uint8_t size_x, uint8_t size_y);
111 void getTextBounds(
const char *
string, int16_t x, int16_t y, int16_t *x1,
112 int16_t *y1, uint16_t *w, uint16_t *h);
113 void getTextBounds(
const __FlashStringHelper *s, int16_t x, int16_t y,
114 int16_t *x1, int16_t *y1, uint16_t *w, uint16_t *h);
115 void getTextBounds(
const String &str, int16_t x, int16_t y, int16_t *x1,
116 int16_t *y1, uint16_t *w, uint16_t *h);
182 virtual size_t write(uint8_t);
184 virtual void write(uint8_t);
230 void charBounds(
unsigned char c, int16_t *x, int16_t *y, int16_t *minx,
231 int16_t *miny, int16_t *maxx, int16_t *maxy);
254 void initButton(
Adafruit_GFX *gfx, int16_t x, int16_t y, uint16_t w,
255 uint16_t h, uint16_t outline, uint16_t fill,
256 uint16_t
textcolor,
char *label, uint8_t textsize);
257 void initButton(
Adafruit_GFX *gfx, int16_t x, int16_t y, uint16_t w,
258 uint16_t h, uint16_t outline, uint16_t fill,
259 uint16_t textcolor,
char *label, uint8_t
textsize_x,
262 void initButtonUL(
Adafruit_GFX *gfx, int16_t x1, int16_t y1, uint16_t w,
263 uint16_t h, uint16_t outline, uint16_t fill,
264 uint16_t textcolor,
char *label, uint8_t textsize);
265 void initButtonUL(
Adafruit_GFX *gfx, int16_t x1, int16_t y1, uint16_t w,
266 uint16_t h, uint16_t outline, uint16_t fill,
267 uint16_t textcolor,
char *label, uint8_t textsize_x,
269 void drawButton(
bool inverted =
false);
270 bool contains(int16_t x, int16_t y);
279 laststate = currstate;
300 uint16_t _outlinecolor, _fillcolor, _textcolor;
303 bool currstate, laststate;
311 void drawPixel(int16_t x, int16_t y, uint16_t color);
313 void drawFastVLine(int16_t x, int16_t y, int16_t h, uint16_t color);
314 void drawFastHLine(int16_t x, int16_t y, int16_t w, uint16_t color);
315 bool getPixel(int16_t x, int16_t y)
const;
325 bool getRawPixel(int16_t x, int16_t y)
const;
326 void drawFastRawVLine(int16_t x, int16_t y, int16_t h, uint16_t color);
327 void drawFastRawHLine(int16_t x, int16_t y, int16_t w, uint16_t color);
334 static const uint8_t PROGMEM GFXsetBit[], GFXclrBit[];
343 void drawPixel(int16_t x, int16_t y, uint16_t color);
345 void drawFastVLine(int16_t x, int16_t y, int16_t h, uint16_t color);
346 void drawFastHLine(int16_t x, int16_t y, int16_t w, uint16_t color);
347 uint8_t getPixel(int16_t x, int16_t y)
const;
357 uint8_t getRawPixel(int16_t x, int16_t y)
const;
358 void drawFastRawVLine(int16_t x, int16_t y, int16_t h, uint16_t color);
359 void drawFastRawHLine(int16_t x, int16_t y, int16_t w, uint16_t color);
370 void drawPixel(int16_t x, int16_t y, uint16_t color);
373 void drawFastVLine(int16_t x, int16_t y, int16_t h, uint16_t color);
374 void drawFastHLine(int16_t x, int16_t y, int16_t w, uint16_t color);
375 uint16_t getPixel(int16_t x, int16_t y)
const;
385 uint16_t getRawPixel(int16_t x, int16_t y)
const;
386 void drawFastRawVLine(int16_t x, int16_t y, int16_t h, uint16_t color);
387 void drawFastRawHLine(int16_t x, int16_t y, int16_t w, uint16_t color);
393 #endif // _ADAFRUIT_GFX_H uint8_t * getBuffer(void) const
Get a pointer to the internal buffer memory.
Definition: Adafruit_GFX.h:354
+
void fillCircleHelper(int16_t x0, int16_t y0, int16_t r, uint8_t cornername, int16_t delta, uint16_t color)
Quarter-circle drawer with fill, used for circles and roundrects.
Definition: Adafruit_GFX.cpp:471
+
virtual void writePixel(int16_t x, int16_t y, uint16_t color)
Write a pixel, overwrite in subclasses if startWrite is defined!
Definition: Adafruit_GFX.cpp:190
-
void setTextColor(uint16_t c, uint16_t bg)
Set text font color with custom background color.
Definition: Adafruit_GFX.h:152
-
void drawXBitmap(int16_t x, int16_t y, const uint8_t bitmap[], int16_t w, int16_t h, uint16_t color)
Draw PROGMEM-resident XBitMap Files (*.xbm), exported from GIMP. Usage: Export from GIMP to *...
Definition: Adafruit_GFX.cpp:882
+
void setTextColor(uint16_t c, uint16_t bg)
Set text font color with custom background color.
Definition: Adafruit_GFX.h:150
+
void drawXBitmap(int16_t x, int16_t y, const uint8_t bitmap[], int16_t w, int16_t h, uint16_t color)
Draw PROGMEM-resident XBitMap Files (*.xbm), exported from GIMP. Usage: Export from GIMP to *...
Definition: Adafruit_GFX.cpp:851
Data stored for FONT AS A WHOLE.
Definition: gfxfont.h:21
-
void setTextWrap(bool w)
Set whether text that is too long for the screen width should automatically wrap around to the next l...
Definition: Adafruit_GFX.h:164
+
void setTextWrap(bool w)
Set whether text that is too long for the screen width should automatically wrap around to the next l...
Definition: Adafruit_GFX.h:162
Definition: Adafruit_GFX.h:15
-
void fillCircle(int16_t x0, int16_t y0, int16_t r, uint16_t color)
Draw a circle with filled color.
Definition: Adafruit_GFX.cpp:483
-
uint8_t * getBuffer(void) const
Get a pointer to the internal buffer memory.
Definition: Adafruit_GFX.h:324
+
void fillCircle(int16_t x0, int16_t y0, int16_t r, uint16_t color)
Draw a circle with filled color.
Definition: Adafruit_GFX.cpp:452
+
uint8_t * getBuffer(void) const
Get a pointer to the internal buffer memory.
Definition: Adafruit_GFX.h:322
virtual void drawPixel(int16_t x, int16_t y, uint16_t color)=0
Draw to the screen/framebuffer/etc. Must be overridden in subclass.
-
virtual void endWrite(void)
End a display-writing routine, overwrite in subclasses if startWrite is defined!
Definition: Adafruit_GFX.cpp:284
-
void drawChar(int16_t x, int16_t y, unsigned char c, uint16_t color, uint16_t bg, uint8_t size)
Draw a single character.
Definition: Adafruit_GFX.cpp:1146
-
int16_t getCursorX(void) const
Get text cursor X location.
Definition: Adafruit_GFX.h:221
+
virtual void endWrite(void)
End a display-writing routine, overwrite in subclasses if startWrite is defined!
Definition: Adafruit_GFX.cpp:253
+
void drawChar(int16_t x, int16_t y, unsigned char c, uint16_t color, uint16_t bg, uint8_t size)
Draw a single character.
Definition: Adafruit_GFX.cpp:1115
+
int16_t getCursorX(void) const
Get text cursor X location.
Definition: Adafruit_GFX.h:219
virtual void writeFillRect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color)
Write a rectangle completely with one color, overwrite in subclasses if startWrite is defined! ...
Definition: Adafruit_GFX.cpp:241
-
int16_t cursor_y
y location to start print()ing text
Definition: Adafruit_GFX.h:239
-
void drawTriangle(int16_t x0, int16_t y0, int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint16_t color)
Draw a triangle with no fill color.
Definition: Adafruit_GFX.cpp:631
-
GFXfont * gfxFont
Pointer to special font.
Definition: Adafruit_GFX.h:247
-
void drawRoundRect(int16_t x0, int16_t y0, int16_t w, int16_t h, int16_t radius, uint16_t color)
Draw a rounded rectangle with no fill color.
Definition: Adafruit_GFX.cpp:575
-
A GFX 1-bit canvas context for graphics.
Definition: Adafruit_GFX.h:309
-
void setFont(const GFXfont *f=NULL)
Set the font to display when print()ing, either custom or default.
Definition: Adafruit_GFX.cpp:1382
-
uint8_t textsize_x
Desired magnification in X-axis of text to print()
Definition: Adafruit_GFX.h:242
-
virtual void writeColor(uint16_t color, uint32_t len)
write len pixels of the given color, overwrite in subclasses if needed
Definition: Adafruit_GFX.cpp:273
-
A GFX 16-bit canvas context for graphics.
Definition: Adafruit_GFX.h:368
-
virtual void invertDisplay(bool i)
Invert the display (ideally using built-in hardware command)
Definition: Adafruit_GFX.cpp:1584
-
void drawCircleHelper(int16_t x0, int16_t y0, int16_t r, uint8_t cornername, uint16_t color)
Quarter-circle drawer, used to do circles and roundrects.
Definition: Adafruit_GFX.cpp:438
-
-
void drawRGBBitmap(int16_t x, int16_t y, const uint16_t bitmap[], int16_t w, int16_t h)
Draw a PROGMEM-resident 16-bit image (RGB 5/6/5) at the specified (x,y) position. For 16-bit display ...
Definition: Adafruit_GFX.cpp:1032
-
bool _cp437
If set, use correct CP437 charset (default is off)
Definition: Adafruit_GFX.h:246
-
A GFX 8-bit canvas context for graphics.
Definition: Adafruit_GFX.h:341
-
void setTextColor(uint16_t c)
Set text font color with transparant background.
Definition: Adafruit_GFX.h:143
+
int16_t cursor_y
y location to start print()ing text
Definition: Adafruit_GFX.h:237
+
void drawTriangle(int16_t x0, int16_t y0, int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint16_t color)
Draw a triangle with no fill color.
Definition: Adafruit_GFX.cpp:600
+
GFXfont * gfxFont
Pointer to special font.
Definition: Adafruit_GFX.h:245
+
void drawRoundRect(int16_t x0, int16_t y0, int16_t w, int16_t h, int16_t radius, uint16_t color)
Draw a rounded rectangle with no fill color.
Definition: Adafruit_GFX.cpp:544
+
A GFX 1-bit canvas context for graphics.
Definition: Adafruit_GFX.h:307
+
void setFont(const GFXfont *f=NULL)
Set the font to display when print()ing, either custom or default.
Definition: Adafruit_GFX.cpp:1338
+
uint8_t textsize_x
Desired magnification in X-axis of text to print()
Definition: Adafruit_GFX.h:240
+
A GFX 16-bit canvas context for graphics.
Definition: Adafruit_GFX.h:366
+
virtual void invertDisplay(bool i)
Invert the display (ideally using built-in hardware command)
Definition: Adafruit_GFX.cpp:1540
+
void drawCircleHelper(int16_t x0, int16_t y0, int16_t r, uint8_t cornername, uint16_t color)
Quarter-circle drawer, used to do circles and roundrects.
Definition: Adafruit_GFX.cpp:407
+
+
void drawRGBBitmap(int16_t x, int16_t y, const uint16_t bitmap[], int16_t w, int16_t h)
Draw a PROGMEM-resident 16-bit image (RGB 5/6/5) at the specified (x,y) position. For 16-bit display ...
Definition: Adafruit_GFX.cpp:1001
+
bool _cp437
If set, use correct CP437 charset (default is off)
Definition: Adafruit_GFX.h:244
+
A GFX 8-bit canvas context for graphics.
Definition: Adafruit_GFX.h:339
+
void setTextColor(uint16_t c)
Set text font color with transparant background.
Definition: Adafruit_GFX.h:141
virtual void writeLine(int16_t x0, int16_t y0, int16_t x1, int16_t y1, uint16_t color)
Write a line. Bresenham's algorithm - thx wikpedia.
Definition: Adafruit_GFX.cpp:132
-
virtual void fillRect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color)
Fill a rectangle completely with one color. Update in subclasses if desired!
Definition: Adafruit_GFX.cpp:331
-
int16_t height(void) const
Get height of the display, accounting for current rotation.
Definition: Adafruit_GFX.h:203
-
void cp437(bool x=true)
Enable (or disable) Code Page 437-compatible charset. There was an error in glcdfont.c for the longest time – one character (#176, the 'light shade' block) was missing – this threw off the index of every character that followed it. But a TON of code has been written with the erroneous character indices. By default, the library uses the original 'wrong' behavior and old sketches will still work. Pass 'true' to this function to use correct CP437 character values in your code.
Definition: Adafruit_GFX.h:180
-
virtual void setRotation(uint8_t r)
Set rotation setting for display.
Definition: Adafruit_GFX.cpp:1360
-
void drawGrayscaleBitmap(int16_t x, int16_t y, const uint8_t bitmap[], int16_t w, int16_t h)
Draw a PROGMEM-resident 8-bit image (grayscale) at the specified (x,y) pos. Specifically for 8-bit di...
Definition: Adafruit_GFX.cpp:916
-
void charBounds(unsigned char c, int16_t *x, int16_t *y, int16_t *minx, int16_t *miny, int16_t *maxx, int16_t *maxy)
Helper to determine size of a character with current font/size. Broke this out as it's used by both t...
Definition: Adafruit_GFX.cpp:1415
-
uint8_t getRotation(void) const
Get rotation setting for display.
Definition: Adafruit_GFX.h:211
-
void setTextSize(uint8_t s)
Set text 'magnification' size. Each increase in s makes 1 pixel that much bigger. ...
Definition: Adafruit_GFX.cpp:1339
-
uint16_t textbgcolor
16-bit text color for print()
Definition: Adafruit_GFX.h:241
+
virtual void fillRect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color)
Fill a rectangle completely with one color. Update in subclasses if desired!
Definition: Adafruit_GFX.cpp:300
+
int16_t height(void) const
Get height of the display, accounting for current rotation.
Definition: Adafruit_GFX.h:201
+
void cp437(bool x=true)
Enable (or disable) Code Page 437-compatible charset. There was an error in glcdfont.c for the longest time – one character (#176, the 'light shade' block) was missing – this threw off the index of every character that followed it. But a TON of code has been written with the erroneous character indices. By default, the library uses the original 'wrong' behavior and old sketches will still work. Pass 'true' to this function to use correct CP437 character values in your code.
Definition: Adafruit_GFX.h:178
+
virtual void setRotation(uint8_t r)
Set rotation setting for display.
Definition: Adafruit_GFX.cpp:1316
+
void drawGrayscaleBitmap(int16_t x, int16_t y, const uint8_t bitmap[], int16_t w, int16_t h)
Draw a PROGMEM-resident 8-bit image (grayscale) at the specified (x,y) pos. Specifically for 8-bit di...
Definition: Adafruit_GFX.cpp:885
+
void charBounds(unsigned char c, int16_t *x, int16_t *y, int16_t *minx, int16_t *miny, int16_t *maxx, int16_t *maxy)
Helper to determine size of a character with current font/size. Broke this out as it's used by both t...
Definition: Adafruit_GFX.cpp:1371
+
uint8_t getRotation(void) const
Get rotation setting for display.
Definition: Adafruit_GFX.h:209
+
void setTextSize(uint8_t s)
Set text 'magnification' size. Each increase in s makes 1 pixel that much bigger. ...
Definition: Adafruit_GFX.cpp:1295
+
uint16_t textbgcolor
16-bit text color for print()
Definition: Adafruit_GFX.h:239
Adafruit_GFX(int16_t w, int16_t h)
Instatiate a GFX context for graphics! Can only be done by a superclass.
Definition: Adafruit_GFX.cpp:110
-
int16_t cursor_x
x location to start print()ing text
Definition: Adafruit_GFX.h:238
-
uint8_t textsize_y
Desired magnification in Y-axis of text to print()
Definition: Adafruit_GFX.h:243
-
int16_t _height
Display height as modified by current rotation.
Definition: Adafruit_GFX.h:237
-
int16_t _width
Display width as modified by current rotation.
Definition: Adafruit_GFX.h:236
-
void fillRoundRect(int16_t x0, int16_t y0, int16_t w, int16_t h, int16_t radius, uint16_t color)
Draw a rounded rectangle with fill color.
Definition: Adafruit_GFX.cpp:605
-
virtual void drawFastHLine(int16_t x, int16_t y, int16_t w, uint16_t color)
Draw a perfectly horizontal line (this is often optimized in a subclass!)
Definition: Adafruit_GFX.cpp:313
-
int16_t getCursorY(void) const
Get text cursor Y location.
Definition: Adafruit_GFX.h:229
-
uint8_t rotation
Display rotation (0 thru 3)
Definition: Adafruit_GFX.h:244
-
void setCursor(int16_t x, int16_t y)
Set text cursor location.
Definition: Adafruit_GFX.h:130
-
uint16_t textcolor
16-bit background color for print()
Definition: Adafruit_GFX.h:240
-
bool wrap
If set, 'wrap' text at right edge of display.
Definition: Adafruit_GFX.h:245
-
void fillTriangle(int16_t x0, int16_t y0, int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint16_t color)
Draw a triangle with color-fill.
Definition: Adafruit_GFX.cpp:650
-
uint16_t * getBuffer(void) const
Get a pointer to the internal buffer memory.
Definition: Adafruit_GFX.h:384
-
virtual void setAddrWindow(uint16_t x, uint16_t y, uint16_t w, uint16_t h)
set the address window (memory area), overwrite in subclasses if needed
Definition: Adafruit_GFX.cpp:257
-
virtual void drawFastVLine(int16_t x, int16_t y, int16_t h, uint16_t color)
Draw a perfectly vertical line (this is often optimized in a subclass!)
Definition: Adafruit_GFX.cpp:296
-
virtual void drawLine(int16_t x0, int16_t y0, int16_t x1, int16_t y1, uint16_t color)
Draw a line.
Definition: Adafruit_GFX.cpp:361
+
int16_t cursor_x
x location to start print()ing text
Definition: Adafruit_GFX.h:236
+
uint8_t textsize_y
Desired magnification in Y-axis of text to print()
Definition: Adafruit_GFX.h:241
+
int16_t _height
Display height as modified by current rotation.
Definition: Adafruit_GFX.h:235
+
int16_t _width
Display width as modified by current rotation.
Definition: Adafruit_GFX.h:234
+
void fillRoundRect(int16_t x0, int16_t y0, int16_t w, int16_t h, int16_t radius, uint16_t color)
Draw a rounded rectangle with fill color.
Definition: Adafruit_GFX.cpp:574
+
virtual void drawFastHLine(int16_t x, int16_t y, int16_t w, uint16_t color)
Draw a perfectly horizontal line (this is often optimized in a subclass!)
Definition: Adafruit_GFX.cpp:282
+
int16_t getCursorY(void) const
Get text cursor Y location.
Definition: Adafruit_GFX.h:227
+
uint8_t rotation
Display rotation (0 thru 3)
Definition: Adafruit_GFX.h:242
+
void setCursor(int16_t x, int16_t y)
Set text cursor location.
Definition: Adafruit_GFX.h:128
+
uint16_t textcolor
16-bit background color for print()
Definition: Adafruit_GFX.h:238
+
bool wrap
If set, 'wrap' text at right edge of display.
Definition: Adafruit_GFX.h:243
+
void fillTriangle(int16_t x0, int16_t y0, int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint16_t color)
Draw a triangle with color-fill.
Definition: Adafruit_GFX.cpp:619
+
uint16_t * getBuffer(void) const
Get a pointer to the internal buffer memory.
Definition: Adafruit_GFX.h:382
+
virtual void drawFastVLine(int16_t x, int16_t y, int16_t h, uint16_t color)
Draw a perfectly vertical line (this is often optimized in a subclass!)
Definition: Adafruit_GFX.cpp:265
+
virtual void drawLine(int16_t x0, int16_t y0, int16_t x1, int16_t y1, uint16_t color)
Draw a line.
Definition: Adafruit_GFX.cpp:330
virtual void startWrite(void)
Start a display-writing routine, overwrite in subclasses.
Definition: Adafruit_GFX.cpp:180
-
int16_t HEIGHT
This is the 'raw' display height - never changes.
Definition: Adafruit_GFX.h:235
-
void drawCircle(int16_t x0, int16_t y0, int16_t r, uint16_t color)
Draw a circle outline.
Definition: Adafruit_GFX.cpp:388
+
int16_t HEIGHT
This is the 'raw' display height - never changes.
Definition: Adafruit_GFX.h:233
+
void drawCircle(int16_t x0, int16_t y0, int16_t r, uint16_t color)
Draw a circle outline.
Definition: Adafruit_GFX.cpp:357
virtual void writeFastHLine(int16_t x, int16_t y, int16_t w, uint16_t color)
Write a perfectly horizontal line, overwrite in subclasses if startWrite is defined! ...
Definition: Adafruit_GFX.cpp:222
-
void drawBitmap(int16_t x, int16_t y, const uint8_t bitmap[], int16_t w, int16_t h, uint16_t color)
Draw a PROGMEM-resident 1-bit image at the specified (x,y) position, using the specified foreground c...
Definition: Adafruit_GFX.cpp:748
+
void drawBitmap(int16_t x, int16_t y, const uint8_t bitmap[], int16_t w, int16_t h, uint16_t color)
Draw a PROGMEM-resident 1-bit image at the specified (x,y) position, using the specified foreground c...
Definition: Adafruit_GFX.cpp:717
virtual void writeFastVLine(int16_t x, int16_t y, int16_t h, uint16_t color)
Write a perfectly vertical line, overwrite in subclasses if startWrite is defined! ...
Definition: Adafruit_GFX.cpp:204
-
-
virtual void drawRect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color)
Draw a rectangle with no fill color.
Definition: Adafruit_GFX.cpp:554
-
void getTextBounds(const char *string, int16_t x, int16_t y, int16_t *x1, int16_t *y1, uint16_t *w, uint16_t *h)
Helper to determine size of a string with current font/size. Pass string and a cursor position...
Definition: Adafruit_GFX.cpp:1492
-
virtual void write(uint8_t)
Print one byte/character of data, used to support print()
Definition: Adafruit_GFX.cpp:1286
-
virtual void fillScreen(uint16_t color)
Fill the screen completely with one color. Update in subclasses if desired!
Definition: Adafruit_GFX.cpp:347
-
int16_t WIDTH
This is the 'raw' display width - never changes.
Definition: Adafruit_GFX.h:234
-
int16_t width(void) const
Get width of the display, accounting for current rotation.
Definition: Adafruit_GFX.h:195
+
+
virtual void drawRect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color)
Draw a rectangle with no fill color.
Definition: Adafruit_GFX.cpp:523
+
void getTextBounds(const char *string, int16_t x, int16_t y, int16_t *x1, int16_t *y1, uint16_t *w, uint16_t *h)
Helper to determine size of a string with current font/size. Pass string and a cursor position...
Definition: Adafruit_GFX.cpp:1448
+
virtual void write(uint8_t)
Print one byte/character of data, used to support print()
Definition: Adafruit_GFX.cpp:1242
+
virtual void fillScreen(uint16_t color)
Fill the screen completely with one color. Update in subclasses if desired!
Definition: Adafruit_GFX.cpp:316
+
int16_t WIDTH
This is the 'raw' display width - never changes.
Definition: Adafruit_GFX.h:232
+
int16_t width(void) const
Get width of the display, accounting for current rotation.
Definition: Adafruit_GFX.h:193