|
F439_CPP_SPI_RA8875_TFT_LCD_03 1.0
STM32F439 SPI RA8875 7-inch TFT display demo built on the STM32_GFX and STM32_RA8875 libraries
|
#include <Adafruit_GFX.h>
Public Member Functions | |
| Adafruit_GFX (int16_t w, int16_t h) | |
| Instatiate a GFX context for graphics! Can only be done by a superclass. | |
| 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 | startWrite (void) |
| Start a display-writing routine, overwrite in subclasses. | |
| virtual void | writePixel (int16_t x, int16_t y, uint16_t color) |
| Write a pixel, overwrite in subclasses if startWrite is defined! | |
| 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! | |
| 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! | |
| 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! | |
| 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. | |
| virtual void | endWrite (void) |
| End a display-writing routine, overwrite in subclasses if startWrite is defined! | |
| virtual void | setRotation (uint8_t r) |
| Set rotation setting for display. | |
| virtual void | invertDisplay (bool i) |
| Invert the display (ideally using built-in hardware command) | |
| 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!) | |
| 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!) | |
| 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! | |
| virtual void | fillScreen (uint16_t color) |
| Fill the screen completely with one color. Update in subclasses if desired! | |
| virtual void | drawLine (int16_t x0, int16_t y0, int16_t x1, int16_t y1, uint16_t color) |
| Draw a line. | |
| 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. | |
| void | drawCircle (int16_t x0, int16_t y0, int16_t r, uint16_t color) |
| Draw a circle outline. | |
| 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. | |
| void | fillCircle (int16_t x0, int16_t y0, int16_t r, uint16_t color) |
| Draw a circle with filled color. | |
| void | fillCircleHelper (int16_t x0, int16_t y0, int16_t r, uint8_t cornername, int16_t delta, uint16_t color) |
| Half-circle drawer with fill, used for circles and roundrects. | |
| void | drawEllipse (int16_t x0, int16_t y0, int16_t rw, int16_t rh, uint16_t color) |
| Draw an ellipse outline. | |
| void | fillEllipse (int16_t x0, int16_t y0, int16_t rw, int16_t rh, uint16_t color) |
| Draw an ellipse with filled colour. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| void | drawRotatedRect (int16_t cenX, int16_t cenY, int16_t w, int16_t h, int16_t angleDeg, uint16_t color) |
| Draw a rotated rectangle. | |
| void | fillRotatedRect (int16_t cenX, int16_t cenY, int16_t w, int16_t h, int16_t angleDeg, uint16_t color) |
| Draw a filled rotated rectangle. | |
| void | rotatePoint (int16_t &x0, int16_t &y0, int16_t angleDeg) |
| Rotate a point in standard position. | |
| 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 color (unset bits are transparent). | |
| void | drawBitmap (int16_t x, int16_t y, const uint8_t bitmap[], int16_t w, int16_t h, uint16_t color, uint16_t bg) |
| Draw a PROGMEM-resident 1-bit image at the specified (x,y) position, using the specified foreground (for set bits) and background (unset bits) colors. | |
| void | drawBitmap (int16_t x, int16_t y, uint8_t *bitmap, int16_t w, int16_t h, uint16_t color) |
| Draw a RAM-resident 1-bit image at the specified (x,y) position, using the specified foreground color (unset bits are transparent). | |
| void | drawBitmap (int16_t x, int16_t y, uint8_t *bitmap, int16_t w, int16_t h, uint16_t color, uint16_t bg) |
| Draw a RAM-resident 1-bit image at the specified (x,y) position, using the specified foreground (for set bits) and background (unset bits) colors. | |
| 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 *.xbm, rename *.xbm to *.c and open in editor. C Array can be directly used with this function. There is no RAM-resident version of this function; if generating bitmaps in RAM, use the format defined by drawBitmap() and call that instead. | |
| 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 display devices such as IS31FL3731; no color reduction/expansion is performed. | |
| void | drawGrayscaleBitmap (int16_t x, int16_t y, uint8_t *bitmap, int16_t w, int16_t h) |
| Draw a RAM-resident 8-bit image (grayscale) at the specified (x,y) pos. Specifically for 8-bit display devices such as IS31FL3731; no color reduction/expansion is performed. | |
| void | drawGrayscaleBitmap (int16_t x, int16_t y, const uint8_t bitmap[], const uint8_t mask[], int16_t w, int16_t h) |
| Draw a PROGMEM-resident 8-bit image (grayscale) with a 1-bit mask (set bits = opaque, unset bits = clear) at the specified (x,y) position. BOTH buffers (grayscale and mask) must be PROGMEM-resident. Specifically for 8-bit display devices such as IS31FL3731; no color reduction/expansion is performed. | |
| void | drawGrayscaleBitmap (int16_t x, int16_t y, uint8_t *bitmap, uint8_t *mask, int16_t w, int16_t h) |
| Draw a RAM-resident 8-bit image (grayscale) with a 1-bit mask (set bits = opaque, unset bits = clear) at the specified (x,y) position. BOTH buffers (grayscale and mask) must be RAM-residentt, no mix-and-match Specifically for 8-bit display devices such as IS31FL3731; no color reduction/expansion is performed. | |
| 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 devices; no color reduction performed. | |
| void | drawRGBBitmap (int16_t x, int16_t y, uint16_t *bitmap, int16_t w, int16_t h) |
| Draw a RAM-resident 16-bit image (RGB 5/6/5) at the specified (x,y) position. For 16-bit display devices; no color reduction performed. | |
| void | drawRGBBitmap (int16_t x, int16_t y, const uint16_t bitmap[], const uint8_t mask[], int16_t w, int16_t h) |
| Draw a PROGMEM-resident 16-bit image (RGB 5/6/5) with a 1-bit mask (set bits = opaque, unset bits = clear) at the specified (x,y) position. BOTH buffers (color and mask) must be PROGMEM-resident. For 16-bit display devices; no color reduction performed. | |
| void | drawRGBBitmap (int16_t x, int16_t y, uint16_t *bitmap, uint8_t *mask, int16_t w, int16_t h) |
| Draw a RAM-resident 16-bit image (RGB 5/6/5) with a 1-bit mask (set bits = opaque, unset bits = clear) at the specified (x,y) position. BOTH buffers (color and mask) must be RAM-resident. For 16-bit display devices; no color reduction performed. | |
| void | drawChar (int16_t x, int16_t y, unsigned char c, uint16_t color, uint16_t bg, uint8_t size) |
| Draw a single character. | |
| void | drawChar (int16_t x, int16_t y, unsigned char c, uint16_t color, uint16_t bg, uint8_t size_x, uint8_t size_y) |
| Draw a single character. | |
| 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, returns UL corner and W,H. | |
| void | getTextBounds (const __FlashStringHelper *s, int16_t x, int16_t y, int16_t *x1, int16_t *y1, uint16_t *w, uint16_t *h) |
| Helper to determine size of a PROGMEM string with current font/size. Pass string and a cursor position, returns UL corner and W,H. | |
| void | getTextBounds (const String &str, 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, returns UL corner and W,H. | |
| void | setTextSize (uint8_t s) |
| Set text 'magnification' size. Each increase in s makes 1 pixel that much bigger. | |
| void | setTextSize (uint8_t sx, uint8_t sy) |
| Set text 'magnification' size. Each increase in s makes 1 pixel that much bigger. | |
| void | setFont (const GFXfont *f=NULL) |
| Set the font to display when print()ing, either custom or default. | |
| void | setCursor (int16_t x, int16_t y) |
| Set text cursor location. | |
| void | setTextColor (uint16_t c) |
| Set text font color with transparant background. | |
| void | setTextColor (uint16_t c, uint16_t bg) |
| Set text font color with custom background color. | |
| void | setTextWrap (bool w) |
| Set whether text that is too long for the screen width should automatically wrap around to the next line (else clip right). | |
| 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. | |
| virtual void | write (uint8_t) |
| Print one byte/character of data, used to support print() | |
| int16_t | width (void) const |
| Get width of the display, accounting for current rotation. | |
| int16_t | height (void) const |
| Get height of the display, accounting for current rotation. | |
| uint8_t | getRotation (void) const |
| Get rotation setting for display. | |
| int16_t | getCursorX (void) const |
| Get text cursor X location. | |
| int16_t | getCursorY (void) const |
| Get text cursor Y location. | |
| virtual size_t | write (uint8_t c)=0 |
| size_t | write (const char *str) |
| virtual size_t | write (const uint8_t *buffer, size_t size) |
| size_t | write (const char *buffer, size_t size) |
Public Member Functions inherited from Print | |
| Print () | |
| Constructor: no write error. | |
| virtual | ~Print () |
| Virtual destructor. | |
| int | getWriteError () |
| void | clearWriteError () |
| Clear the write-error flag. | |
| size_t | write (const char *str) |
| size_t | write (const char *buffer, size_t size) |
| virtual int | availableForWrite () |
| virtual void | flush () |
| Wait for pending output to finish (no-op by default). | |
| size_t | print (const __FlashStringHelper *ifsh) |
| size_t | print (const String &s) |
| size_t | print (const char str[]) |
| size_t | print (char c) |
| size_t | print (unsigned char b, int base=DEC) |
| size_t | print (int n, int base=DEC) |
| size_t | print (unsigned int n, int base=DEC) |
| size_t | print (long n, int base=DEC) |
| size_t | print (unsigned long n, int base=DEC) |
| size_t | print (double n, int digits=2) |
| size_t | println (const __FlashStringHelper *ifsh) |
| size_t | println (const String &s) |
| size_t | println (const char str[]) |
| size_t | println (char c) |
| size_t | println (unsigned char b, int base=DEC) |
| size_t | println (int n, int base=DEC) |
| size_t | println (unsigned int n, int base=DEC) |
| size_t | println (long n, int base=DEC) |
| size_t | println (unsigned long n, int base=DEC) |
| size_t | println (double n, int digits=2) |
| size_t | println (void) |
Protected Member Functions | |
| 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 the PROGMEM- and RAM-resident getTextBounds() functions. | |
Protected Member Functions inherited from Print | |
| void | setWriteError (int err=1) |
Protected Attributes | |
| int16_t | WIDTH |
| This is the 'raw' display width - never changes. | |
| int16_t | HEIGHT |
| This is the 'raw' display height - never changes. | |
| int16_t | _width |
| Display width as modified by current rotation. | |
| int16_t | _height |
| Display height as modified by current rotation. | |
| int16_t | cursor_x |
| x location to start print()ing text | |
| int16_t | cursor_y |
| y location to start print()ing text | |
| uint16_t | textcolor |
| 16-bit background color for print() | |
| uint16_t | textbgcolor |
| 16-bit text color for print() | |
| uint8_t | textsize_x |
| Desired magnification in X-axis of text to print() | |
| uint8_t | textsize_y |
| Desired magnification in Y-axis of text to print() | |
| uint8_t | rotation |
| Display rotation (0 thru 3) | |
| bool | wrap |
| If set, 'wrap' text at right edge of display. | |
| bool | _cp437 |
| If set, use correct CP437 charset (default is off) | |
| GFXfont * | gfxFont |
| Pointer to special font. | |
A generic graphics superclass that can handle all sorts of drawing. At a minimum you can subclass and provide drawPixel(). At a maximum you can do a ton of overriding to optimize. Used for any/all Adafruit displays!
Definition at line 11 of file Adafruit_GFX.h.
| Adafruit_GFX::Adafruit_GFX | ( | int16_t | w, |
| int16_t | h ) |
Instatiate a GFX context for graphics! Can only be done by a superclass.
| w | Display width, in pixels |
| h | Display height, in pixels |
Definition at line 109 of file Adafruit_GFX.cpp.
References _cp437, _height, _width, cursor_x, cursor_y, gfxFont, HEIGHT, rotation, textbgcolor, textcolor, textsize_x, textsize_y, WIDTH, and wrap.
|
protected |
Helper to determine size of a character with current font/size. Broke this out as it's used by both the PROGMEM- and RAM-resident getTextBounds() functions.
| c | The ASCII character in question |
| x | Pointer to x location of character. Value is modified by this function to advance to next character. |
| y | Pointer to y location of character. Value is modified by this function to advance to next character. |
| minx | Pointer to minimum X coordinate, passed in to AND returned by this function – this is used to incrementally build a bounding rectangle for a string. |
| miny | Pointer to minimum Y coord, passed in AND returned. |
| maxx | Pointer to maximum X coord, passed in AND returned. |
| maxy | Pointer to maximum Y coord, passed in AND returned. |
Definition at line 1626 of file Adafruit_GFX.cpp.
References _width, gfxFont, textsize_x, textsize_y, and wrap.
Referenced by getTextBounds(), and getTextBounds().
|
inline |
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.
| x | true = enable (new behavior), false = disable (old behavior) |
Definition at line 183 of file Adafruit_GFX.h.
References _cp437.
| void Adafruit_GFX::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 color (unset bits are transparent).
| x | Top left corner x coordinate |
| y | Top left corner y coordinate |
| bitmap | byte array with monochrome bitmap |
| w | Width of bitmap in pixels |
| h | Height of bitmap in pixels |
| color | 16-bit 5-6-5 Color to draw with |
Definition at line 972 of file Adafruit_GFX.cpp.
References endWrite(), startWrite(), and writePixel().
| void Adafruit_GFX::drawBitmap | ( | int16_t | x, |
| int16_t | y, | ||
| const uint8_t | bitmap[], | ||
| int16_t | w, | ||
| int16_t | h, | ||
| uint16_t | color, | ||
| uint16_t | bg ) |
Draw a PROGMEM-resident 1-bit image at the specified (x,y) position, using the specified foreground (for set bits) and background (unset bits) colors.
| x | Top left corner x coordinate |
| y | Top left corner y coordinate |
| bitmap | byte array with monochrome bitmap |
| w | Width of bitmap in pixels |
| h | Height of bitmap in pixels |
| color | 16-bit 5-6-5 Color to draw pixels with |
| bg | 16-bit 5-6-5 Color to draw background with |
Definition at line 1006 of file Adafruit_GFX.cpp.
References endWrite(), startWrite(), and writePixel().
| void Adafruit_GFX::drawBitmap | ( | int16_t | x, |
| int16_t | y, | ||
| uint8_t * | bitmap, | ||
| int16_t | w, | ||
| int16_t | h, | ||
| uint16_t | color ) |
Draw a RAM-resident 1-bit image at the specified (x,y) position, using the specified foreground color (unset bits are transparent).
| x | Top left corner x coordinate |
| y | Top left corner y coordinate |
| bitmap | byte array with monochrome bitmap |
| w | Width of bitmap in pixels |
| h | Height of bitmap in pixels |
| color | 16-bit 5-6-5 Color to draw with |
Definition at line 1038 of file Adafruit_GFX.cpp.
References endWrite(), startWrite(), and writePixel().
| void Adafruit_GFX::drawBitmap | ( | int16_t | x, |
| int16_t | y, | ||
| uint8_t * | bitmap, | ||
| int16_t | w, | ||
| int16_t | h, | ||
| uint16_t | color, | ||
| uint16_t | bg ) |
Draw a RAM-resident 1-bit image at the specified (x,y) position, using the specified foreground (for set bits) and background (unset bits) colors.
| x | Top left corner x coordinate |
| y | Top left corner y coordinate |
| bitmap | byte array with monochrome bitmap |
| w | Width of bitmap in pixels |
| h | Height of bitmap in pixels |
| color | 16-bit 5-6-5 Color to draw pixels with |
| bg | 16-bit 5-6-5 Color to draw background with |
Definition at line 1072 of file Adafruit_GFX.cpp.
References endWrite(), startWrite(), and writePixel().
| void Adafruit_GFX::drawChar | ( | int16_t | x, |
| int16_t | y, | ||
| unsigned char | c, | ||
| uint16_t | color, | ||
| uint16_t | bg, | ||
| uint8_t | size ) |
Draw a single character.
| x | Bottom left corner x coordinate |
| y | Bottom left corner y coordinate |
| c | The 8-bit font-indexed character (likely ascii) |
| color | 16-bit 5-6-5 Color to draw chraracter with |
| bg | 16-bit 5-6-5 Color to fill background with (if same as color, no background) |
| size | Font magnification level, 1 is 'original' size |
Definition at line 1370 of file Adafruit_GFX.cpp.
References drawChar().
Referenced by drawChar(), and write().
| void Adafruit_GFX::drawChar | ( | int16_t | x, |
| int16_t | y, | ||
| unsigned char | c, | ||
| uint16_t | color, | ||
| uint16_t | bg, | ||
| uint8_t | size_x, | ||
| uint8_t | size_y ) |
Draw a single character.
| x | Bottom left corner x coordinate |
| y | Bottom left corner y coordinate |
| c | The 8-bit font-indexed character (likely ascii) |
| color | 16-bit 5-6-5 Color to draw chraracter with |
| bg | 16-bit 5-6-5 Color to fill background with (if same as color, no background) |
| size_x | Font magnification level in X-axis, 1 is 'original' size |
| size_y | Font magnification level in Y-axis, 1 is 'original' size |
Definition at line 1389 of file Adafruit_GFX.cpp.
References _cp437, _height, _width, endWrite(), gfxFont, startWrite(), writeFastVLine(), writeFillRect(), and writePixel().
| void Adafruit_GFX::drawCircle | ( | int16_t | x0, |
| int16_t | y0, | ||
| int16_t | r, | ||
| uint16_t | color ) |
Draw a circle outline.
| x0 | Center-point x coordinate |
| y0 | Center-point y coordinate |
| r | Radius of circle |
| color | 16-bit 5-6-5 Color to draw with |
Definition at line 470 of file Adafruit_GFX.cpp.
References endWrite(), startWrite(), and writePixel().
| void Adafruit_GFX::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.
| x0 | Center-point x coordinate |
| y0 | Center-point y coordinate |
| r | Radius of circle |
| cornername | Mask bit #1, #2, #4, and #8 to indicate which quarters of the circle we're doing |
| color | 16-bit 5-6-5 Color to draw with |
Definition at line 520 of file Adafruit_GFX.cpp.
References writePixel().
Referenced by drawRoundRect().
| void Adafruit_GFX::drawEllipse | ( | int16_t | x0, |
| int16_t | y0, | ||
| int16_t | rw, | ||
| int16_t | rh, | ||
| uint16_t | color ) |
Draw an ellipse outline.
| x0 | Center-point x coordinate |
| y0 | Center-point y coordinate |
| rw | Horizontal radius of ellipse |
| rh | Vertical radius of ellipse |
| color | 16-bit 5-6-5 Color to draw with |
Definition at line 356 of file Adafruit_GFX.cpp.
References endWrite(), startWrite(), and writePixel().
|
virtual |
Draw a perfectly horizontal line (this is often optimized in a subclass!)
| x | Left-most x coordinate |
| y | Left-most y coordinate |
| w | Width in pixels |
| color | 16-bit 5-6-5 Color to fill with |
Reimplemented in GFXcanvas1, GFXcanvas8, GFXcanvas16, and Adafruit_RA8875.
Definition at line 280 of file Adafruit_GFX.cpp.
References endWrite(), startWrite(), and writeLine().
Referenced by drawLine(), fillEllipse(), and writeFastHLine().
|
virtual |
Draw a perfectly vertical line (this is often optimized in a subclass!)
| x | Top-most x coordinate |
| y | Top-most y coordinate |
| h | Height in pixels |
| color | 16-bit 5-6-5 Color to fill with |
Reimplemented in GFXcanvas1, GFXcanvas8, GFXcanvas16, and Adafruit_RA8875.
Definition at line 263 of file Adafruit_GFX.cpp.
References endWrite(), startWrite(), and writeLine().
Referenced by drawLine(), and writeFastVLine().
| void Adafruit_GFX::drawGrayscaleBitmap | ( | int16_t | x, |
| int16_t | y, | ||
| const uint8_t | bitmap[], | ||
| const uint8_t | mask[], | ||
| int16_t | w, | ||
| int16_t | h ) |
Draw a PROGMEM-resident 8-bit image (grayscale) with a 1-bit mask (set bits = opaque, unset bits = clear) at the specified (x,y) position. BOTH buffers (grayscale and mask) must be PROGMEM-resident. Specifically for 8-bit display devices such as IS31FL3731; no color reduction/expansion is performed.
| x | Top left corner x coordinate |
| y | Top left corner y coordinate |
| bitmap | byte array with grayscale bitmap |
| mask | byte array with mask bitmap |
| w | Width of bitmap in pixels |
| h | Height of bitmap in pixels |
Definition at line 1190 of file Adafruit_GFX.cpp.
References endWrite(), startWrite(), and writePixel().
| void Adafruit_GFX::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 display devices such as IS31FL3731; no color reduction/expansion is performed.
| x | Top left corner x coordinate |
| y | Top left corner y coordinate |
| bitmap | byte array with grayscale bitmap |
| w | Width of bitmap in pixels |
| h | Height of bitmap in pixels |
Definition at line 1140 of file Adafruit_GFX.cpp.
References endWrite(), startWrite(), and writePixel().
| void Adafruit_GFX::drawGrayscaleBitmap | ( | int16_t | x, |
| int16_t | y, | ||
| uint8_t * | bitmap, | ||
| int16_t | w, | ||
| int16_t | h ) |
Draw a RAM-resident 8-bit image (grayscale) at the specified (x,y) pos. Specifically for 8-bit display devices such as IS31FL3731; no color reduction/expansion is performed.
| x | Top left corner x coordinate |
| y | Top left corner y coordinate |
| bitmap | byte array with grayscale bitmap |
| w | Width of bitmap in pixels |
| h | Height of bitmap in pixels |
Definition at line 1164 of file Adafruit_GFX.cpp.
References endWrite(), startWrite(), and writePixel().
| void Adafruit_GFX::drawGrayscaleBitmap | ( | int16_t | x, |
| int16_t | y, | ||
| uint8_t * | bitmap, | ||
| uint8_t * | mask, | ||
| int16_t | w, | ||
| int16_t | h ) |
Draw a RAM-resident 8-bit image (grayscale) with a 1-bit mask (set bits = opaque, unset bits = clear) at the specified (x,y) position. BOTH buffers (grayscale and mask) must be RAM-residentt, no mix-and-match Specifically for 8-bit display devices such as IS31FL3731; no color reduction/expansion is performed.
| x | Top left corner x coordinate |
| y | Top left corner y coordinate |
| bitmap | byte array with grayscale bitmap |
| mask | byte array with mask bitmap |
| w | Width of bitmap in pixels |
| h | Height of bitmap in pixels |
Definition at line 1226 of file Adafruit_GFX.cpp.
References endWrite(), startWrite(), and writePixel().
|
virtual |
Draw a line.
| x0 | Start point x coordinate |
| y0 | Start point y coordinate |
| x1 | End point x coordinate |
| y1 | End point y coordinate |
| color | 16-bit 5-6-5 Color to draw with |
Reimplemented in Adafruit_RA8875.
Definition at line 328 of file Adafruit_GFX.cpp.
References drawFastHLine(), drawFastVLine(), endWrite(), startWrite(), and writeLine().
Referenced by drawRotatedRect(), and drawTriangle().
|
pure virtual |
Draw to the screen/framebuffer/etc. Must be overridden in subclass.
| x | X coordinate in pixels |
| y | Y coordinate in pixels |
| color | 16-bit pixel color. |
Implemented in GFXcanvas1, GFXcanvas8, GFXcanvas16, and Adafruit_RA8875.
Referenced by writePixel().
|
virtual |
Draw a rectangle with no fill color.
| x | Top left corner x coordinate |
| y | Top left corner y coordinate |
| w | Width in pixels |
| h | Height in pixels |
| color | 16-bit 5-6-5 Color to draw with |
Reimplemented in Adafruit_RA8875.
Definition at line 637 of file Adafruit_GFX.cpp.
References endWrite(), startWrite(), writeFastHLine(), and writeFastVLine().
| void Adafruit_GFX::drawRGBBitmap | ( | int16_t | x, |
| int16_t | y, | ||
| const uint16_t | bitmap[], | ||
| const uint8_t | mask[], | ||
| int16_t | w, | ||
| int16_t | h ) |
Draw a PROGMEM-resident 16-bit image (RGB 5/6/5) with a 1-bit mask (set bits = opaque, unset bits = clear) at the specified (x,y) position. BOTH buffers (color and mask) must be PROGMEM-resident. For 16-bit display devices; no color reduction performed.
| x | Top left corner x coordinate |
| y | Top left corner y coordinate |
| bitmap | byte array with 16-bit color bitmap |
| mask | byte array with monochrome mask bitmap |
| w | Width of bitmap in pixels |
| h | Height of bitmap in pixels |
Definition at line 1303 of file Adafruit_GFX.cpp.
References endWrite(), startWrite(), and writePixel().
| void Adafruit_GFX::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 devices; no color reduction performed.
| x | Top left corner x coordinate |
| y | Top left corner y coordinate |
| bitmap | byte array with 16-bit color bitmap |
| w | Width of bitmap in pixels |
| h | Height of bitmap in pixels |
Definition at line 1256 of file Adafruit_GFX.cpp.
References endWrite(), startWrite(), and writePixel().
| void Adafruit_GFX::drawRGBBitmap | ( | int16_t | x, |
| int16_t | y, | ||
| uint16_t * | bitmap, | ||
| int16_t | w, | ||
| int16_t | h ) |
Draw a RAM-resident 16-bit image (RGB 5/6/5) at the specified (x,y) position. For 16-bit display devices; no color reduction performed.
| x | Top left corner x coordinate |
| y | Top left corner y coordinate |
| bitmap | byte array with 16-bit color bitmap |
| w | Width of bitmap in pixels |
| h | Height of bitmap in pixels |
Definition at line 1278 of file Adafruit_GFX.cpp.
References endWrite(), startWrite(), and writePixel().
| void Adafruit_GFX::drawRGBBitmap | ( | int16_t | x, |
| int16_t | y, | ||
| uint16_t * | bitmap, | ||
| uint8_t * | mask, | ||
| int16_t | w, | ||
| int16_t | h ) |
Draw a RAM-resident 16-bit image (RGB 5/6/5) with a 1-bit mask (set bits = opaque, unset bits = clear) at the specified (x,y) position. BOTH buffers (color and mask) must be RAM-resident. For 16-bit display devices; no color reduction performed.
| x | Top left corner x coordinate |
| y | Top left corner y coordinate |
| bitmap | byte array with 16-bit color bitmap |
| mask | byte array with monochrome mask bitmap |
| w | Width of bitmap in pixels |
| h | Height of bitmap in pixels |
Definition at line 1336 of file Adafruit_GFX.cpp.
References endWrite(), startWrite(), and writePixel().
| void Adafruit_GFX::drawRotatedRect | ( | int16_t | cenX, |
| int16_t | cenY, | ||
| int16_t | w, | ||
| int16_t | h, | ||
| int16_t | angleDeg, | ||
| uint16_t | color ) |
Draw a rotated rectangle.
| cenX | x coordinate of center of rectangle. For even width rectangles, this point represents the pixel to the left of true center. |
| cenY | y coordinate of center of rectangle. For even height rectangles, this point represents the pixel above true center. |
| w | width of rectangle |
| h | height of rectangle |
| angleDeg | angle of rotation of rectangle |
| color | 16-bit 5-6-5 Color to fill/draw with |
Definition at line 719 of file Adafruit_GFX.cpp.
References drawLine(), and rotatePoint().
| void Adafruit_GFX::drawRoundRect | ( | int16_t | x, |
| int16_t | y, | ||
| int16_t | w, | ||
| int16_t | h, | ||
| int16_t | r, | ||
| uint16_t | color ) |
Draw a rounded rectangle with no fill color.
| x | Top left corner x coordinate |
| y | Top left corner y coordinate |
| w | Width in pixels |
| h | Height in pixels |
| r | Radius of corner rounding |
| color | 16-bit 5-6-5 Color to draw with |
Definition at line 658 of file Adafruit_GFX.cpp.
References drawCircleHelper(), endWrite(), startWrite(), writeFastHLine(), and writeFastVLine().
Referenced by Adafruit_GFX_Button::drawButton().
| void Adafruit_GFX::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.
| x0 | Vertex #0 x coordinate |
| y0 | Vertex #0 y coordinate |
| x1 | Vertex #1 x coordinate |
| y1 | Vertex #1 y coordinate |
| x2 | Vertex #2 x coordinate |
| y2 | Vertex #2 y coordinate |
| color | 16-bit 5-6-5 Color to draw with |
Definition at line 855 of file Adafruit_GFX.cpp.
References drawLine().
| void Adafruit_GFX::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 *.xbm, rename *.xbm to *.c and open in editor. C Array can be directly used with this function. There is no RAM-resident version of this function; if generating bitmaps in RAM, use the format defined by drawBitmap() and call that instead.
| x | Top left corner x coordinate |
| y | Top left corner y coordinate |
| bitmap | byte array with monochrome bitmap |
| w | Width of bitmap in pixels |
| h | Height of bitmap in pixels |
| color | 16-bit 5-6-5 Color to draw pixels with |
Definition at line 1106 of file Adafruit_GFX.cpp.
References endWrite(), startWrite(), and writePixel().
|
virtual |
End a display-writing routine, overwrite in subclasses if startWrite is defined!
Definition at line 251 of file Adafruit_GFX.cpp.
Referenced by drawBitmap(), drawBitmap(), drawBitmap(), drawBitmap(), drawChar(), drawCircle(), drawEllipse(), drawFastHLine(), drawFastVLine(), drawGrayscaleBitmap(), drawGrayscaleBitmap(), drawGrayscaleBitmap(), drawGrayscaleBitmap(), drawLine(), drawRect(), drawRGBBitmap(), drawRGBBitmap(), drawRGBBitmap(), drawRGBBitmap(), drawRoundRect(), drawXBitmap(), fillCircle(), fillEllipse(), fillRect(), fillRoundRect(), and fillTriangle().
| void Adafruit_GFX::fillCircle | ( | int16_t | x0, |
| int16_t | y0, | ||
| int16_t | r, | ||
| uint16_t | color ) |
Draw a circle with filled color.
| x0 | Center-point x coordinate |
| y0 | Center-point y coordinate |
| r | Radius of circle |
| color | 16-bit 5-6-5 Color to fill with |
Definition at line 565 of file Adafruit_GFX.cpp.
References endWrite(), fillCircleHelper(), startWrite(), and writeFastVLine().
| void Adafruit_GFX::fillCircleHelper | ( | int16_t | x0, |
| int16_t | y0, | ||
| int16_t | r, | ||
| uint8_t | corners, | ||
| int16_t | delta, | ||
| uint16_t | color ) |
Half-circle drawer with fill, used for circles and roundrects.
| x0 | Center-point x coordinate |
| y0 | Center-point y coordinate |
| r | Radius of circle |
| corners | Mask bits indicating which sides of the circle we are doing, left (1) and/or right (2) |
| delta | Offset from center-point, used for round-rects |
| color | 16-bit 5-6-5 Color to fill with |
Definition at line 585 of file Adafruit_GFX.cpp.
References writeFastVLine().
Referenced by fillCircle(), and fillRoundRect().
| void Adafruit_GFX::fillEllipse | ( | int16_t | x0, |
| int16_t | y0, | ||
| int16_t | rw, | ||
| int16_t | rh, | ||
| uint16_t | color ) |
Draw an ellipse with filled colour.
| x0 | Center-point x coordinate |
| y0 | Center-point y coordinate |
| rw | Horizontal radius of ellipse |
| rh | Vertical radius of ellipse |
| color | 16-bit 5-6-5 Color to draw with |
Definition at line 415 of file Adafruit_GFX.cpp.
References drawFastHLine(), endWrite(), and startWrite().
|
virtual |
Fill a rectangle completely with one color. Update in subclasses if desired!
| x | Top left corner x coordinate |
| y | Top left corner y coordinate |
| w | Width in pixels |
| h | Height in pixels |
| color | 16-bit 5-6-5 Color to fill with |
Reimplemented in Adafruit_RA8875.
Definition at line 298 of file Adafruit_GFX.cpp.
References endWrite(), startWrite(), and writeFastVLine().
Referenced by fillScreen(), and writeFillRect().
| void Adafruit_GFX::fillRotatedRect | ( | int16_t | cenX, |
| int16_t | cenY, | ||
| int16_t | w, | ||
| int16_t | h, | ||
| int16_t | angleDeg, | ||
| uint16_t | color ) |
Draw a filled rotated rectangle.
| cenX | x coordinate of center of rectangle. For even width rectangles, this point represents the pixel to the left of true center. |
| cenY | y coordinate of center of rectangle. For even height rectangles, this point represents the pixel above true center. |
| w | width of rectangle |
| h | height of rectangle |
| angleDeg | angle of rotation of rectangle |
| color | 16-bit 5-6-5 Color to fill/draw with |
Definition at line 779 of file Adafruit_GFX.cpp.
References fillTriangle(), and rotatePoint().
| void Adafruit_GFX::fillRoundRect | ( | int16_t | x, |
| int16_t | y, | ||
| int16_t | w, | ||
| int16_t | h, | ||
| int16_t | r, | ||
| uint16_t | color ) |
Draw a rounded rectangle with fill color.
| x | Top left corner x coordinate |
| y | Top left corner y coordinate |
| w | Width in pixels |
| h | Height in pixels |
| r | Radius of corner rounding |
| color | 16-bit 5-6-5 Color to draw/fill with |
Definition at line 688 of file Adafruit_GFX.cpp.
References endWrite(), fillCircleHelper(), startWrite(), and writeFillRect().
Referenced by Adafruit_GFX_Button::drawButton().
|
virtual |
Fill the screen completely with one color. Update in subclasses if desired!
| color | 16-bit 5-6-5 Color to fill with |
Reimplemented in GFXcanvas1, GFXcanvas8, GFXcanvas16, and Adafruit_RA8875.
Definition at line 314 of file Adafruit_GFX.cpp.
References _height, _width, and fillRect().
| void Adafruit_GFX::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.
| x0 | Vertex #0 x coordinate |
| y0 | Vertex #0 y coordinate |
| x1 | Vertex #1 x coordinate |
| y1 | Vertex #1 y coordinate |
| x2 | Vertex #2 x coordinate |
| y2 | Vertex #2 y coordinate |
| color | 16-bit 5-6-5 Color to fill/draw with |
Definition at line 874 of file Adafruit_GFX.cpp.
References endWrite(), startWrite(), and writeFastHLine().
Referenced by fillRotatedRect().
|
inline |
Get text cursor X location.
Definition at line 224 of file Adafruit_GFX.h.
References cursor_x.
|
inline |
Get text cursor Y location.
Definition at line 232 of file Adafruit_GFX.h.
References cursor_y.
|
inline |
Get rotation setting for display.
Definition at line 214 of file Adafruit_GFX.h.
References rotation.
Referenced by GFXcanvas1::drawFastHLine(), GFXcanvas8::drawFastHLine(), GFXcanvas16::drawFastHLine(), GFXcanvas1::drawFastVLine(), GFXcanvas8::drawFastVLine(), and GFXcanvas16::drawFastVLine().
| void Adafruit_GFX::getTextBounds | ( | const __FlashStringHelper * | str, |
| int16_t | x, | ||
| int16_t | y, | ||
| int16_t * | x1, | ||
| int16_t * | y1, | ||
| uint16_t * | w, | ||
| uint16_t * | h ) |
Helper to determine size of a PROGMEM string with current font/size. Pass string and a cursor position, returns UL corner and W,H.
| str | The flash-memory ascii string to measure |
| x | The current cursor X |
| y | The current cursor Y |
| x1 | The boundary X coordinate, set by function |
| y1 | The boundary Y coordinate, set by function |
| w | The boundary width, set by function |
| h | The boundary height, set by function |
Definition at line 1765 of file Adafruit_GFX.cpp.
References _height, _width, and charBounds().
| void Adafruit_GFX::getTextBounds | ( | const char * | str, |
| 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, returns UL corner and W,H.
| str | The ASCII string to measure |
| x | The current cursor X |
| y | The current cursor Y |
| x1 | The boundary X coordinate, returned by function |
| y1 | The boundary Y coordinate, returned by function |
| w | The boundary width, returned by function |
| h | The boundary height, returned by function |
Definition at line 1703 of file Adafruit_GFX.cpp.
References charBounds().
Referenced by getTextBounds().
| void Adafruit_GFX::getTextBounds | ( | const String & | str, |
| 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, returns UL corner and W,H.
| str | The ascii string to measure (as an arduino String() class) |
| x | The current cursor X |
| y | The current cursor Y |
| x1 | The boundary X coordinate, set by function |
| y1 | The boundary Y coordinate, set by function |
| w | The boundary width, set by function |
| h | The boundary height, set by function |
Definition at line 1744 of file Adafruit_GFX.cpp.
References String::c_str(), getTextBounds(), and String::length().
|
inline |
Get height of the display, accounting for current rotation.
Definition at line 206 of file Adafruit_GFX.h.
References _height.
Referenced by GFXcanvas1::drawFastHLine(), GFXcanvas8::drawFastHLine(), GFXcanvas16::drawFastHLine(), GFXcanvas1::drawFastVLine(), GFXcanvas8::drawFastVLine(), and GFXcanvas16::drawFastVLine().
|
virtual |
Invert the display (ideally using built-in hardware command)
| i | True if you want to invert, false to make 'normal' |
Definition at line 1795 of file Adafruit_GFX.cpp.
| void Adafruit_GFX::rotatePoint | ( | int16_t & | x0, |
| int16_t & | y0, | ||
| int16_t | angleDeg ) |
Rotate a point in standard position.
| x0 | x coordinate of point to rotate. This is passed by reference and updated upon return |
| y0 | y coordinate of point to rotate. This is passed by reference and updated upon return |
| angleDeg | angle to rotate the point by (degrees) |
Definition at line 830 of file Adafruit_GFX.cpp.
Referenced by drawRotatedRect(), and fillRotatedRect().
|
inline |
Set text cursor location.
| x | X coordinate in pixels |
| y | Y coordinate in pixels |
Definition at line 133 of file Adafruit_GFX.h.
References cursor_x, and cursor_y.
Referenced by Adafruit_GFX_Button::drawButton().
| void Adafruit_GFX::setFont | ( | const GFXfont * | f = NULL | ) |
Set the font to display when print()ing, either custom or default.
| f | The GFXfont object, if NULL use built in 6x8 font |
Definition at line 1593 of file Adafruit_GFX.cpp.
|
virtual |
|
inline |
Set text font color with transparant background.
| c | 16-bit 5-6-5 Color to draw text with |
Definition at line 146 of file Adafruit_GFX.h.
References textbgcolor, and textcolor.
Referenced by Adafruit_GFX_Button::drawButton().
|
inline |
Set text font color with custom background color.
| c | 16-bit 5-6-5 Color to draw text with |
| bg | 16-bit 5-6-5 Color to draw background/fill with |
Definition at line 155 of file Adafruit_GFX.h.
References textbgcolor, and textcolor.
| void Adafruit_GFX::setTextSize | ( | uint8_t | s | ) |
Set text 'magnification' size. Each increase in s makes 1 pixel that much bigger.
| s | Desired text size. 1 is default 6x8, 2 is 12x16, 3 is 18x24, etc |
Definition at line 1550 of file Adafruit_GFX.cpp.
References setTextSize().
Referenced by Adafruit_GFX_Button::drawButton(), and setTextSize().
| void Adafruit_GFX::setTextSize | ( | uint8_t | s_x, |
| uint8_t | s_y ) |
Set text 'magnification' size. Each increase in s makes 1 pixel that much bigger.
| s_x | Desired text width magnification level in X-axis. 1 is default |
| s_y | Desired text width magnification level in Y-axis. 1 is default |
Definition at line 1560 of file Adafruit_GFX.cpp.
References textsize_x, and textsize_y.
|
inline |
Set whether text that is too long for the screen width should automatically wrap around to the next line (else clip right).
| w | true for wrapping, false for clipping |
Definition at line 167 of file Adafruit_GFX.h.
References wrap.
|
virtual |
Start a display-writing routine, overwrite in subclasses.
Definition at line 178 of file Adafruit_GFX.cpp.
Referenced by drawBitmap(), drawBitmap(), drawBitmap(), drawBitmap(), drawChar(), drawCircle(), drawEllipse(), drawFastHLine(), drawFastVLine(), drawGrayscaleBitmap(), drawGrayscaleBitmap(), drawGrayscaleBitmap(), drawGrayscaleBitmap(), drawLine(), drawRect(), drawRGBBitmap(), drawRGBBitmap(), drawRGBBitmap(), drawRGBBitmap(), drawRoundRect(), drawXBitmap(), fillCircle(), fillEllipse(), fillRect(), fillRoundRect(), and fillTriangle().
|
inline |
Get width of the display, accounting for current rotation.
Definition at line 198 of file Adafruit_GFX.h.
References _width.
Referenced by GFXcanvas1::drawFastHLine(), GFXcanvas8::drawFastHLine(), GFXcanvas16::drawFastHLine(), GFXcanvas1::drawFastVLine(), GFXcanvas8::drawFastVLine(), and GFXcanvas16::drawFastVLine().
|
inline |
|
inline |
|
virtual |
Write a buffer of bytes.
| buffer | Bytes to write |
| size | Number of bytes |
Reimplemented from Print.
Reimplemented in Adafruit_RA8875.
|
virtual |
Write one byte; the only function a subclass must provide.
| c | The byte to write |
Implements Print.
Reimplemented in Adafruit_RA8875.
|
virtual |
Print one byte/character of data, used to support print()
| c | The 8-bit ascii character to write |
Implements Print.
Reimplemented in Adafruit_RA8875.
Definition at line 1497 of file Adafruit_GFX.cpp.
References _width, cursor_x, cursor_y, drawChar(), gfxFont, textbgcolor, textcolor, textsize_x, textsize_y, and wrap.
|
virtual |
Write a perfectly horizontal line, overwrite in subclasses if startWrite is defined!
| x | Left-most x coordinate |
| y | Left-most y coordinate |
| w | Width in pixels |
| color | 16-bit 5-6-5 Color to fill with |
Definition at line 220 of file Adafruit_GFX.cpp.
References drawFastHLine().
Referenced by drawRect(), drawRoundRect(), and fillTriangle().
|
virtual |
Write a perfectly vertical line, overwrite in subclasses if startWrite is defined!
| x | Top-most x coordinate |
| y | Top-most y coordinate |
| h | Height in pixels |
| color | 16-bit 5-6-5 Color to fill with |
Definition at line 202 of file Adafruit_GFX.cpp.
References drawFastVLine().
Referenced by drawChar(), drawRect(), drawRoundRect(), fillCircle(), fillCircleHelper(), and fillRect().
|
virtual |
Write a rectangle completely with one color, overwrite in subclasses if startWrite is defined!
| x | Top left corner x coordinate |
| y | Top left corner y coordinate |
| w | Width in pixels |
| h | Height in pixels |
| color | 16-bit 5-6-5 Color to fill with |
Definition at line 239 of file Adafruit_GFX.cpp.
References fillRect().
Referenced by drawChar(), and fillRoundRect().
|
virtual |
Write a line. Bresenham's algorithm - thx wikpedia.
| x0 | Start point x coordinate |
| y0 | Start point y coordinate |
| x1 | End point x coordinate |
| y1 | End point y coordinate |
| color | 16-bit 5-6-5 Color to draw with |
Definition at line 130 of file Adafruit_GFX.cpp.
References writePixel().
Referenced by drawFastHLine(), drawFastVLine(), and drawLine().
|
virtual |
Write a pixel, overwrite in subclasses if startWrite is defined!
| x | x coordinate |
| y | y coordinate |
| color | 16-bit 5-6-5 Color to fill with |
Definition at line 188 of file Adafruit_GFX.cpp.
References drawPixel().
Referenced by drawBitmap(), drawBitmap(), drawBitmap(), drawBitmap(), drawChar(), drawCircle(), drawCircleHelper(), drawEllipse(), drawGrayscaleBitmap(), drawGrayscaleBitmap(), drawGrayscaleBitmap(), drawGrayscaleBitmap(), drawRGBBitmap(), drawRGBBitmap(), drawRGBBitmap(), drawRGBBitmap(), drawXBitmap(), and writeLine().
|
protected |
If set, use correct CP437 charset (default is off)
Definition at line 249 of file Adafruit_GFX.h.
Referenced by Adafruit_GFX(), cp437(), and drawChar().
|
protected |
Display height as modified by current rotation.
Definition at line 240 of file Adafruit_GFX.h.
Referenced by Adafruit_GFX(), drawChar(), GFXcanvas1::drawPixel(), GFXcanvas8::drawPixel(), GFXcanvas16::drawPixel(), fillScreen(), getTextBounds(), height(), and setRotation().
|
protected |
Display width as modified by current rotation.
Definition at line 239 of file Adafruit_GFX.h.
Referenced by Adafruit_GFX(), charBounds(), drawChar(), GFXcanvas1::drawPixel(), GFXcanvas8::drawPixel(), GFXcanvas16::drawPixel(), fillScreen(), getTextBounds(), setRotation(), width(), and write().
|
protected |
x location to start print()ing text
Definition at line 241 of file Adafruit_GFX.h.
Referenced by Adafruit_GFX(), getCursorX(), setCursor(), and write().
|
protected |
y location to start print()ing text
Definition at line 242 of file Adafruit_GFX.h.
Referenced by Adafruit_GFX(), getCursorY(), setCursor(), setFont(), and write().
|
protected |
Pointer to special font.
Definition at line 250 of file Adafruit_GFX.h.
Referenced by Adafruit_GFX(), charBounds(), drawChar(), setFont(), and write().
|
protected |
This is the 'raw' display height - never changes.
Definition at line 238 of file Adafruit_GFX.h.
Referenced by Adafruit_GFX(), GFXcanvas16::byteSwap(), GFXcanvas1::drawFastHLine(), GFXcanvas8::drawFastHLine(), GFXcanvas16::drawFastHLine(), GFXcanvas1::drawFastVLine(), GFXcanvas8::drawFastVLine(), GFXcanvas16::drawFastVLine(), GFXcanvas1::drawPixel(), GFXcanvas8::drawPixel(), GFXcanvas16::drawPixel(), GFXcanvas1::fillScreen(), GFXcanvas8::fillScreen(), GFXcanvas16::fillScreen(), GFXcanvas1::getPixel(), GFXcanvas8::getPixel(), GFXcanvas16::getPixel(), GFXcanvas1::getRawPixel(), GFXcanvas8::getRawPixel(), GFXcanvas16::getRawPixel(), and setRotation().
|
protected |
Display rotation (0 thru 3)
Definition at line 247 of file Adafruit_GFX.h.
Referenced by Adafruit_GFX(), GFXcanvas1::drawPixel(), GFXcanvas8::drawPixel(), GFXcanvas16::drawPixel(), GFXcanvas1::getPixel(), GFXcanvas8::getPixel(), GFXcanvas16::getPixel(), getRotation(), Adafruit_RA8875::setRotation(), and setRotation().
|
protected |
16-bit text color for print()
Definition at line 244 of file Adafruit_GFX.h.
Referenced by Adafruit_GFX(), setTextColor(), setTextColor(), and write().
|
protected |
16-bit background color for print()
Definition at line 243 of file Adafruit_GFX.h.
Referenced by Adafruit_GFX(), setTextColor(), setTextColor(), and write().
|
protected |
Desired magnification in X-axis of text to print()
Definition at line 245 of file Adafruit_GFX.h.
Referenced by Adafruit_GFX(), charBounds(), setTextSize(), and write().
|
protected |
Desired magnification in Y-axis of text to print()
Definition at line 246 of file Adafruit_GFX.h.
Referenced by Adafruit_GFX(), charBounds(), setTextSize(), and write().
|
protected |
This is the 'raw' display width - never changes.
Definition at line 237 of file Adafruit_GFX.h.
Referenced by Adafruit_GFX(), GFXcanvas16::byteSwap(), GFXcanvas1::drawFastHLine(), GFXcanvas8::drawFastHLine(), GFXcanvas16::drawFastHLine(), GFXcanvas1::drawFastRawHLine(), GFXcanvas8::drawFastRawHLine(), GFXcanvas16::drawFastRawHLine(), GFXcanvas1::drawFastRawVLine(), GFXcanvas8::drawFastRawVLine(), GFXcanvas16::drawFastRawVLine(), GFXcanvas1::drawFastVLine(), GFXcanvas8::drawFastVLine(), GFXcanvas16::drawFastVLine(), GFXcanvas1::drawPixel(), GFXcanvas8::drawPixel(), GFXcanvas16::drawPixel(), GFXcanvas1::fillScreen(), GFXcanvas8::fillScreen(), GFXcanvas16::fillScreen(), GFXcanvas1::getPixel(), GFXcanvas8::getPixel(), GFXcanvas16::getPixel(), GFXcanvas1::getRawPixel(), GFXcanvas8::getRawPixel(), GFXcanvas16::getRawPixel(), and setRotation().
|
protected |
If set, 'wrap' text at right edge of display.
Definition at line 248 of file Adafruit_GFX.h.
Referenced by Adafruit_GFX(), charBounds(), setTextWrap(), and write().