JM9 XRCU Board 0.1.2
Libraries API Reference
Loading...
Searching...
No Matches
Adafruit_GFX.h
1#ifndef _ADAFRUIT_GFX_H
2#define _ADAFRUIT_GFX_H
3
4#if ARDUINO >= 100
5#include "Arduino.h"
6#include "Print.h"
7#else
8#include "WProgram.h"
9#endif
10#include "gfxfont.h"
11
12#include "../Adafruit_BusIO/Adafruit_I2CDevice.h"
13#include "../Adafruit_BusIO/Adafruit_SPIDevice.h"
14
18class Adafruit_GFX : public Print {
19
20public:
21 Adafruit_GFX(int16_t w, int16_t h); // Constructor
22
23 /**********************************************************************/
31 /**********************************************************************/
32 virtual void drawPixel(int16_t x, int16_t y, uint16_t color) = 0;
33
34 // TRANSACTION API / CORE DRAW API
35 // These MAY be overridden by the subclass to provide device-specific
36 // optimized code. Otherwise 'generic' versions are used.
37 virtual void startWrite(void);
38 virtual void writePixel(int16_t x, int16_t y, uint16_t color);
39 virtual void writeFillRect(int16_t x, int16_t y, int16_t w, int16_t h,
40 uint16_t color);
41 virtual void writeFastVLine(int16_t x, int16_t y, int16_t h, uint16_t color);
42 virtual void writeFastHLine(int16_t x, int16_t y, int16_t w, uint16_t color);
43 virtual void writeLine(int16_t x0, int16_t y0, int16_t x1, int16_t y1,
44 uint16_t color);
45 virtual void endWrite(void);
46
47 // CONTROL API
48 // These MAY be overridden by the subclass to provide device-specific
49 // optimized code. Otherwise 'generic' versions are used.
50 virtual void setRotation(uint8_t r);
51 virtual void invertDisplay(bool i);
52
53 // BASIC DRAW API
54 // These MAY be overridden by the subclass to provide device-specific
55 // optimized code. Otherwise 'generic' versions are used.
56
57 // It's good to implement those, even if using transaction API
58 virtual void drawFastVLine(int16_t x, int16_t y, int16_t h, uint16_t color);
59 virtual void drawFastHLine(int16_t x, int16_t y, int16_t w, uint16_t color);
60 virtual void fillRect(int16_t x, int16_t y, int16_t w, int16_t h,
61 uint16_t color);
62 virtual void fillScreen(uint16_t color);
63 // Optional and probably not necessary to change
64 virtual void drawLine(int16_t x0, int16_t y0, int16_t x1, int16_t y1,
65 uint16_t color);
66 virtual void drawRect(int16_t x, int16_t y, int16_t w, int16_t h,
67 uint16_t color);
68
69 // These exist only with Adafruit_GFX (no subclass overrides)
70 void drawCircle(int16_t x0, int16_t y0, int16_t r, uint16_t color);
71 void drawCircleHelper(int16_t x0, int16_t y0, int16_t r, uint8_t cornername,
72 uint16_t color);
73 void fillCircle(int16_t x0, int16_t y0, int16_t r, uint16_t color);
74 void fillCircleHelper(int16_t x0, int16_t y0, int16_t r, uint8_t cornername,
75 int16_t delta, uint16_t color);
76 void drawTriangle(int16_t x0, int16_t y0, int16_t x1, int16_t y1, int16_t x2,
77 int16_t y2, uint16_t color);
78 void fillTriangle(int16_t x0, int16_t y0, int16_t x1, int16_t y1, int16_t x2,
79 int16_t y2, uint16_t color);
80 void drawRoundRect(int16_t x0, int16_t y0, int16_t w, int16_t h,
81 int16_t radius, uint16_t color);
82 void fillRoundRect(int16_t x0, int16_t y0, int16_t w, int16_t h,
83 int16_t radius, uint16_t color);
84 void drawBitmap(int16_t x, int16_t y, const uint8_t bitmap[], int16_t w,
85 int16_t h, uint16_t color);
86 void drawBitmap(int16_t x, int16_t y, const uint8_t bitmap[], int16_t w,
87 int16_t h, uint16_t color, uint16_t bg);
88 void drawBitmap(int16_t x, int16_t y, uint8_t *bitmap, int16_t w, int16_t h,
89 uint16_t color);
90 void drawBitmap(int16_t x, int16_t y, uint8_t *bitmap, int16_t w, int16_t h,
91 uint16_t color, uint16_t bg);
92 void drawXBitmap(int16_t x, int16_t y, const uint8_t bitmap[], int16_t w,
93 int16_t h, uint16_t color);
94 void drawGrayscaleBitmap(int16_t x, int16_t y, const uint8_t bitmap[],
95 int16_t w, int16_t h);
96 void drawGrayscaleBitmap(int16_t x, int16_t y, uint8_t *bitmap, int16_t w,
97 int16_t h);
98 void drawGrayscaleBitmap(int16_t x, int16_t y, const uint8_t bitmap[],
99 const uint8_t mask[], int16_t w, int16_t h);
100 void drawGrayscaleBitmap(int16_t x, int16_t y, uint8_t *bitmap, uint8_t *mask,
101 int16_t w, int16_t h);
102 void drawRGBBitmap(int16_t x, int16_t y, const uint16_t bitmap[], int16_t w,
103 int16_t h);
104 void drawRGBBitmap(int16_t x, int16_t y, uint16_t *bitmap, int16_t w,
105 int16_t h);
106 void drawRGBBitmap(int16_t x, int16_t y, const uint16_t bitmap[],
107 const uint8_t mask[], int16_t w, int16_t h);
108 void drawRGBBitmap(int16_t x, int16_t y, uint16_t *bitmap, uint8_t *mask,
109 int16_t w, int16_t h);
110 void drawChar(int16_t x, int16_t y, unsigned char c, uint16_t color,
111 uint16_t bg, uint8_t size);
112 void drawChar(int16_t x, int16_t y, unsigned char c, uint16_t color,
113 uint16_t bg, uint8_t size_x, uint8_t size_y);
114 void getTextBounds(const char *string, int16_t x, int16_t y, int16_t *x1,
115 int16_t *y1, uint16_t *w, uint16_t *h);
116 void getTextBounds(const __FlashStringHelper *s, int16_t x, int16_t y,
117 int16_t *x1, int16_t *y1, uint16_t *w, uint16_t *h);
118 void getTextBounds(const String &str, int16_t x, int16_t y, int16_t *x1,
119 int16_t *y1, uint16_t *w, uint16_t *h);
120 void setTextSize(uint8_t s);
121 void setTextSize(uint8_t sx, uint8_t sy);
122 void setFont(const GFXfont *f = NULL);
123
124 /**********************************************************************/
130 /**********************************************************************/
131 void setCursor(int16_t x, int16_t y) {
132 cursor_x = x;
133 cursor_y = y;
134 }
135
136 /**********************************************************************/
143 /**********************************************************************/
144 void setTextColor(uint16_t c) { textcolor = textbgcolor = c; }
145
146 /**********************************************************************/
152 /**********************************************************************/
153 void setTextColor(uint16_t c, uint16_t bg) {
154 textcolor = c;
155 textbgcolor = bg;
156 }
157
158 /**********************************************************************/
164 /**********************************************************************/
165 void setTextWrap(bool w) { wrap = w; }
166
167 /**********************************************************************/
180 /**********************************************************************/
181 void cp437(bool x = true) { _cp437 = x; }
182
183 using Print::write;
184#if ARDUINO >= 100
185 virtual size_t write(uint8_t);
186#else
187 virtual void write(uint8_t);
188#endif
189
190 /************************************************************************/
195 /************************************************************************/
196 int16_t width(void) const { return _width; };
197
198 /************************************************************************/
203 /************************************************************************/
204 int16_t height(void) const { return _height; }
205
206 /************************************************************************/
211 /************************************************************************/
212 uint8_t getRotation(void) const { return rotation; }
213
214 // get current cursor position (get rotation safe maximum values,
215 // using: width() for x, height() for y)
216 /************************************************************************/
221 /************************************************************************/
222 int16_t getCursorX(void) const { return cursor_x; }
223
224 /************************************************************************/
229 /************************************************************************/
230 int16_t getCursorY(void) const { return cursor_y; };
231
232protected:
233 void charBounds(unsigned char c, int16_t *x, int16_t *y, int16_t *minx,
234 int16_t *miny, int16_t *maxx, int16_t *maxy);
235 int16_t WIDTH;
236 int16_t HEIGHT;
237 int16_t _width;
238 int16_t _height;
239 int16_t cursor_x;
240 int16_t cursor_y;
241 uint16_t textcolor;
242 uint16_t textbgcolor;
243 uint8_t textsize_x;
244 uint8_t textsize_y;
245 uint8_t rotation;
246 bool wrap;
247 bool _cp437;
249};
250
253
254public:
256 // "Classic" initButton() uses center & size
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);
260 void initButton(Adafruit_GFX *gfx, int16_t x, int16_t y, uint16_t w,
261 uint16_t h, uint16_t outline, uint16_t fill,
262 uint16_t textcolor, char *label, uint8_t textsize_x,
263 uint8_t textsize_y);
264 // New/alt initButton() uses upper-left corner & size
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);
268 void initButtonUL(Adafruit_GFX *gfx, int16_t x1, int16_t y1, uint16_t w,
269 uint16_t h, uint16_t outline, uint16_t fill,
270 uint16_t textcolor, char *label, uint8_t textsize_x,
271 uint8_t textsize_y);
272 void drawButton(bool inverted = false);
273 bool contains(int16_t x, int16_t y);
274
275 /**********************************************************************/
280 /**********************************************************************/
281 void press(bool p) {
282 laststate = currstate;
283 currstate = p;
284 }
285
286 bool justPressed();
287 bool justReleased();
288
289 /**********************************************************************/
294 /**********************************************************************/
295 bool isPressed(void) { return currstate; };
296
297private:
298 Adafruit_GFX *_gfx;
299 int16_t _x1, _y1; // Coordinates of top-left corner
300 uint16_t _w, _h;
301 uint8_t _textsize_x;
302 uint8_t _textsize_y;
303 uint16_t _outlinecolor, _fillcolor, _textcolor;
304 char _label[10];
305
306 bool currstate, laststate;
307};
308
310class GFXcanvas1 : public Adafruit_GFX {
311public:
312 GFXcanvas1(uint16_t w, uint16_t h);
313 ~GFXcanvas1(void);
314 void drawPixel(int16_t x, int16_t y, uint16_t color);
315 void fillScreen(uint16_t color);
316 void drawFastVLine(int16_t x, int16_t y, int16_t h, uint16_t color);
317 void drawFastHLine(int16_t x, int16_t y, int16_t w, uint16_t color);
318 bool getPixel(int16_t x, int16_t y) const;
319 /**********************************************************************/
324 /**********************************************************************/
325 uint8_t *getBuffer(void) const { return buffer; }
326
327protected:
328 bool getRawPixel(int16_t x, int16_t y) const;
329 void drawFastRawVLine(int16_t x, int16_t y, int16_t h, uint16_t color);
330 void drawFastRawHLine(int16_t x, int16_t y, int16_t w, uint16_t color);
331 uint8_t *buffer;
332
333private:
334#ifdef __AVR__
335 // Bitmask tables of 0x80>>X and ~(0x80>>X), because X>>Y is slow on AVR
336 static const uint8_t PROGMEM GFXsetBit[], GFXclrBit[];
337#endif
338};
339
341class GFXcanvas8 : public Adafruit_GFX {
342public:
343 GFXcanvas8(uint16_t w, uint16_t h);
344 ~GFXcanvas8(void);
345 void drawPixel(int16_t x, int16_t y, uint16_t color);
346 void fillScreen(uint16_t color);
347 void drawFastVLine(int16_t x, int16_t y, int16_t h, uint16_t color);
348 void drawFastHLine(int16_t x, int16_t y, int16_t w, uint16_t color);
349 uint8_t getPixel(int16_t x, int16_t y) const;
350 /**********************************************************************/
355 /**********************************************************************/
356 uint8_t *getBuffer(void) const { return buffer; }
357
358protected:
359 uint8_t getRawPixel(int16_t x, int16_t y) const;
360 void drawFastRawVLine(int16_t x, int16_t y, int16_t h, uint16_t color);
361 void drawFastRawHLine(int16_t x, int16_t y, int16_t w, uint16_t color);
362 uint8_t *buffer;
363};
364
366class GFXcanvas16 : public Adafruit_GFX {
367public:
368 GFXcanvas16(uint16_t w, uint16_t h);
369 ~GFXcanvas16(void);
370 void drawPixel(int16_t x, int16_t y, uint16_t color);
371 void fillScreen(uint16_t color);
372 void byteSwap(void);
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;
376 /**********************************************************************/
381 /**********************************************************************/
382 uint16_t *getBuffer(void) const { return buffer; }
383
384protected:
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);
388 uint16_t *buffer;
389};
390
391#endif // _ADAFRUIT_GFX_H
void initButton(Adafruit_GFX *gfx, int16_t x, int16_t y, uint16_t w, uint16_t h, uint16_t outline, uint16_t fill, uint16_t textcolor, char *label, uint8_t textsize)
Initialize button with our desired color/size/settings.
Definition Adafruit_GFX.cpp:1570
Adafruit_GFX_Button(void)
Create a simple drawn button UI element.
Definition Adafruit_GFX.cpp:1552
void initButtonUL(Adafruit_GFX *gfx, int16_t x1, int16_t y1, uint16_t w, uint16_t h, uint16_t outline, uint16_t fill, uint16_t textcolor, char *label, uint8_t textsize)
Initialize button with our desired color/size/settings, with upper-left coordinates.
Definition Adafruit_GFX.cpp:1622
void drawButton(bool inverted=false)
Draw the button on the screen.
Definition Adafruit_GFX.cpp:1675
void press(bool p)
Sets button state, should be done by some touch function.
Definition Adafruit_GFX.h:281
bool justReleased()
Query whether the button was released since we last checked state.
Definition Adafruit_GFX.cpp:1727
bool justPressed()
Query whether the button was pressed since we last checked state.
Definition Adafruit_GFX.cpp:1719
bool contains(int16_t x, int16_t y)
Helper to let us know if a coordinate is within the bounds of the button.
Definition Adafruit_GFX.cpp:1708
bool isPressed(void)
Query whether the button is currently pressed.
Definition Adafruit_GFX.h:295
Definition Adafruit_GFX.h:18
int16_t getCursorX(void) const
Get text cursor X location.
Definition Adafruit_GFX.h:222
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
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
uint16_t textbgcolor
16-bit text color for print()
Definition Adafruit_GFX.h:242
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 HEIGHT
This is the 'raw' display height - never changes.
Definition Adafruit_GFX.h:236
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:165
int16_t width(void) const
Get width of the display, accounting for current rotation.
Definition Adafruit_GFX.h:196
uint8_t rotation
Display rotation (0 thru 3)
Definition Adafruit_GFX.h:245
void setTextSize(uint8_t s)
Set text 'magnification' size. Each increase in s makes 1 pixel that much bigger.
Definition Adafruit_GFX.cpp:1295
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
virtual void invertDisplay(bool i)
Invert the display (ideally using built-in hardware command)
Definition Adafruit_GFX.cpp:1540
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
int16_t height(void) const
Get height of the display, accounting for current rotation.
Definition Adafruit_GFX.h:204
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
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
void setTextColor(uint16_t c)
Set text font color with transparant background.
Definition Adafruit_GFX.h:144
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
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
void drawCircle(int16_t x0, int16_t y0, int16_t r, uint16_t color)
Draw a circle outline.
Definition Adafruit_GFX.cpp:357
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
virtual void setRotation(uint8_t r)
Set rotation setting for display.
Definition Adafruit_GFX.cpp:1316
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
bool _cp437
If set, use correct CP437 charset (default is off)
Definition Adafruit_GFX.h:247
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
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
int16_t getCursorY(void) const
Get text cursor Y location.
Definition Adafruit_GFX.h:230
virtual void write(uint8_t)
Print one byte/character of data, used to support print()
Definition Adafruit_GFX.cpp:1242
bool wrap
If set, 'wrap' text at right edge of display.
Definition Adafruit_GFX.h:246
uint16_t textcolor
16-bit background color for print()
Definition Adafruit_GFX.h:241
int16_t cursor_x
x location to start print()ing text
Definition Adafruit_GFX.h:239
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
uint8_t textsize_x
Desired magnification in X-axis of text to print()
Definition Adafruit_GFX.h:243
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
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 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
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
uint8_t textsize_y
Desired magnification in Y-axis of text to print()
Definition Adafruit_GFX.h:244
virtual void startWrite(void)
Start a display-writing routine, overwrite in subclasses.
Definition Adafruit_GFX.cpp:180
void setCursor(int16_t x, int16_t y)
Set text cursor location.
Definition Adafruit_GFX.h:131
void setFont(const GFXfont *f=NULL)
Set the font to display when print()ing, either custom or default.
Definition Adafruit_GFX.cpp:1338
int16_t _width
Display width as modified by current rotation.
Definition Adafruit_GFX.h:237
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
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:153
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
virtual void drawPixel(int16_t x, int16_t y, uint16_t color)=0
Draw to the screen/framebuffer/etc. Must be overridden in subclass.
uint8_t getRotation(void) const
Get rotation setting for display.
Definition Adafruit_GFX.h:212
int16_t _height
Display height as modified by current rotation.
Definition Adafruit_GFX.h:238
virtual void endWrite(void)
End a display-writing routine, overwrite in subclasses if startWrite is defined!
Definition Adafruit_GFX.cpp:253
void cp437(bool x=true)
Enable (or disable) Code Page 437-compatible charset. There was an error in glcdfont....
Definition Adafruit_GFX.h:181
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
int16_t WIDTH
This is the 'raw' display width - never changes.
Definition Adafruit_GFX.h:235
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 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
int16_t cursor_y
y location to start print()ing text
Definition Adafruit_GFX.h:240
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 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
GFXfont * gfxFont
Pointer to special font.
Definition Adafruit_GFX.h:248
GFXcanvas16(uint16_t w, uint16_t h)
Instatiate a GFX 16-bit canvas context for graphics.
Definition Adafruit_GFX.cpp:2384
void drawFastRawHLine(int16_t x, int16_t y, int16_t w, uint16_t color)
Speed optimized horizontal line drawing into the raw canvas buffer.
Definition Adafruit_GFX.cpp:2662
uint16_t * buffer
Raster data: no longer private, allow subclass access.
Definition Adafruit_GFX.h:388
~GFXcanvas16(void)
Delete the canvas, free memory.
Definition Adafruit_GFX.cpp:2396
void drawFastVLine(int16_t x, int16_t y, int16_t h, uint16_t color)
Speed optimized vertical line drawing.
Definition Adafruit_GFX.cpp:2533
void byteSwap(void)
Reverses the "endian-ness" of each 16-bit pixel within the canvas; little-endian to big-endian,...
Definition Adafruit_GFX.cpp:2516
void drawFastRawVLine(int16_t x, int16_t y, int16_t h, uint16_t color)
Speed optimized vertical line drawing into the raw canvas buffer.
Definition Adafruit_GFX.cpp:2643
uint16_t * getBuffer(void) const
Get a pointer to the internal buffer memory.
Definition Adafruit_GFX.h:382
uint16_t getPixel(int16_t x, int16_t y) const
Get the pixel color value at a given coordinate.
Definition Adafruit_GFX.cpp:2444
void drawFastHLine(int16_t x, int16_t y, int16_t w, uint16_t color)
Speed optimized horizontal line drawing.
Definition Adafruit_GFX.cpp:2588
void drawPixel(int16_t x, int16_t y, uint16_t color)
Draw a pixel to the canvas framebuffer.
Definition Adafruit_GFX.cpp:2409
void fillScreen(uint16_t color)
Fill the framebuffer completely with one color.
Definition Adafruit_GFX.cpp:2490
uint16_t getRawPixel(int16_t x, int16_t y) const
Get the pixel color value at a given, unrotated coordinate. This method is intended for hardware driv...
Definition Adafruit_GFX.cpp:2475
void drawPixel(int16_t x, int16_t y, uint16_t color)
Draw a pixel to the canvas framebuffer.
Definition Adafruit_GFX.cpp:1788
GFXcanvas1(uint16_t w, uint16_t h)
Instatiate a GFX 1-bit canvas context for graphics.
Definition Adafruit_GFX.cpp:1763
void drawFastVLine(int16_t x, int16_t y, int16_t h, uint16_t color)
Speed optimized vertical line drawing.
Definition Adafruit_GFX.cpp:1904
void drawFastRawVLine(int16_t x, int16_t y, int16_t h, uint16_t color)
Speed optimized vertical line drawing into the raw canvas buffer.
Definition Adafruit_GFX.cpp:2015
bool getRawPixel(int16_t x, int16_t y) const
Definition Adafruit_GFX.cpp:1867
void drawFastRawHLine(int16_t x, int16_t y, int16_t w, uint16_t color)
Speed optimized horizontal line drawing into the raw canvas buffer.
Definition Adafruit_GFX.cpp:2053
void drawFastHLine(int16_t x, int16_t y, int16_t w, uint16_t color)
Speed optimized horizontal line drawing.
Definition Adafruit_GFX.cpp:1960
~GFXcanvas1(void)
Delete the canvas, free memory.
Definition Adafruit_GFX.cpp:1775
bool getPixel(int16_t x, int16_t y) const
Definition Adafruit_GFX.cpp:1835
void fillScreen(uint16_t color)
Fill the framebuffer completely with one color.
Definition Adafruit_GFX.cpp:1888
uint8_t * buffer
Raster data: no longer private, allow subclass access.
Definition Adafruit_GFX.h:331
uint8_t * getBuffer(void) const
Get a pointer to the internal buffer memory.
Definition Adafruit_GFX.h:325
~GFXcanvas8(void)
Delete the canvas, free memory.
Definition Adafruit_GFX.cpp:2128
uint8_t getRawPixel(int16_t x, int16_t y) const
Get the pixel color value at a given, unrotated coordinate. This method is intended for hardware driv...
Definition Adafruit_GFX.cpp:2207
GFXcanvas8(uint16_t w, uint16_t h)
Instatiate a GFX 8-bit canvas context for graphics.
Definition Adafruit_GFX.cpp:2116
void drawPixel(int16_t x, int16_t y, uint16_t color)
Draw a pixel to the canvas framebuffer.
Definition Adafruit_GFX.cpp:2141
uint8_t getPixel(int16_t x, int16_t y) const
Get the pixel color value at a given coordinate.
Definition Adafruit_GFX.cpp:2176
uint8_t * getBuffer(void) const
Get a pointer to the internal buffer memory.
Definition Adafruit_GFX.h:356
void drawFastRawHLine(int16_t x, int16_t y, int16_t w, uint16_t color)
Speed optimized horizontal line drawing into the raw canvas buffer.
Definition Adafruit_GFX.cpp:2371
void drawFastVLine(int16_t x, int16_t y, int16_t h, uint16_t color)
Speed optimized vertical line drawing.
Definition Adafruit_GFX.cpp:2238
void fillScreen(uint16_t color)
Fill the framebuffer completely with one color.
Definition Adafruit_GFX.cpp:2222
uint8_t * buffer
Raster data: no longer private, allow subclass access.
Definition Adafruit_GFX.h:362
void drawFastRawVLine(int16_t x, int16_t y, int16_t h, uint16_t color)
Speed optimized vertical line drawing into the raw canvas buffer.
Definition Adafruit_GFX.cpp:2351
void drawFastHLine(int16_t x, int16_t y, int16_t w, uint16_t color)
Speed optimized horizontal line drawing.
Definition Adafruit_GFX.cpp:2294
Data stored for FONT AS A WHOLE.
Definition gfxfont.h:21