| Linduino 1.3.0 Linear Technology Arduino-Compatible Demonstration Board

Public Member Functions | Protected Attributes
Adafruit_GFX Class Referenceabstract

## Detailed Description

Definition at line 13 of file Adafruit_GFX.h.

Inheritance diagram for Adafruit_GFX:

## Public Member Functions
| Adafruit_GFX (int16_t w, int16_t h)
virtual void | drawPixel (int16_t x, int16_t y, uint16_t color)=0
virtual void | drawLine (int16_t x0, int16_t y0, int16_t x1, int16_t y1, uint16_t color)
virtual void | drawFastVLine (int16_t x, int16_t y, int16_t h, uint16_t color)
virtual void | drawFastHLine (int16_t x, int16_t y, int16_t w, uint16_t color)
virtual void | drawRect (int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color)
virtual void | fillRect (int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color)
virtual void | fillScreen (uint16_t color)
virtual void | invertDisplay (boolean i)
void | drawCircle (int16_t x0, int16_t y0, int16_t r, uint16_t color)
void | drawCircleHelper (int16_t x0, int16_t y0, int16_t r, uint8_t cornername, uint16_t color)
void | fillCircle (int16_t x0, int16_t y0, int16_t r, uint16_t color)
void | fillCircleHelper (int16_t x0, int16_t y0, int16_t r, uint8_t cornername, int16_t delta, uint16_t color)
void | drawTriangle (int16_t x0, int16_t y0, int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint16_t color)
void | fillTriangle (int16_t x0, int16_t y0, int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint16_t color)
void | drawRoundRect (int16_t x0, int16_t y0, int16_t w, int16_t h, int16_t radius, uint16_t color)
void | fillRoundRect (int16_t x0, int16_t y0, int16_t w, int16_t h, int16_t radius, uint16_t color)
void | drawBitmap (int16_t x, int16_t y, const uint8_t *bitmap, int16_t w, int16_t h, uint16_t color)
void | drawBitmap (int16_t x, int16_t y, const uint8_t *bitmap, int16_t w, int16_t h, uint16_t color, uint16_t bg)
void | drawBitmap (int16_t x, int16_t y, uint8_t *bitmap, int16_t w, int16_t h, uint16_t color)
void | drawBitmap (int16_t x, int16_t y, uint8_t *bitmap, int16_t w, int16_t h, uint16_t color, uint16_t bg)
void | drawXBitmap (int16_t x, int16_t y, const uint8_t *bitmap, int16_t w, int16_t h, uint16_t color)
void | drawChar (int16_t x, int16_t y, unsigned char c, uint16_t color, uint16_t bg, uint8_t size)
void | setCursor (int16_t x, int16_t y)
void | setTextColor (uint16_t c)
void | setTextColor (uint16_t c, uint16_t bg)
void | setTextSize (uint8_t s)
void | setTextWrap (boolean w)
void | setRotation (uint8_t r)
void | cp437 (boolean x=true)
void | setFont (const GFXfont *f=NULL)
void | getTextBounds (char *string, int16_t x, int16_t y, int16_t *x1, int16_t *y1, uint16_t *w, uint16_t *h)
void | getTextBounds (const __FlashStringHelper *s, int16_t x, int16_t y, int16_t *x1, int16_t *y1, uint16_t *w, uint16_t *h)
virtual void | write (uint8_t)
int16_t | height (void) const
int16_t | width (void) const
uint8_t | getRotation (void) const
int16_t | getCursorX (void) const
int16_t | getCursorY (void) const

## Protected Attributes
const int16_t | WIDTH
const int16_t | HEIGHT
int16_t | _width
int16_t | _height
int16_t | cursor_x
int16_t | cursor_y
uint16_t | textcolor
uint16_t | textbgcolor
uint8_t | textsize
uint8_t | rotation
boolean | wrap
boolean | _cp437
GFXfont * | gfxFont

## Member Function Documentation

## ◆ cp437()

void Adafruit_GFX::cp437 | ( | boolean | x = `true` | ) |

Definition at line 778 of file Adafruit_GFX.cpp.

## ◆ drawBitmap() [1/4]

void Adafruit_GFX::drawBitmap | ( | int16_t | x,
|  | int16_t | y,
|  | const uint8_t * | bitmap,
|  | int16_t | w,
|  | int16_t | h,
|  | uint16_t | color
| ) |  |

Definition at line 430 of file Adafruit_GFX.cpp.

## ◆ drawBitmap() [2/4]

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
| ) |  |

Definition at line 451 of file Adafruit_GFX.cpp.

## ◆ drawBitmap() [3/4]

void Adafruit_GFX::drawBitmap | ( | int16_t | x,
|  | int16_t | y,
|  | uint8_t * | bitmap,
|  | int16_t | w,
|  | int16_t | h,
|  | uint16_t | color
| ) |  |

Definition at line 471 of file Adafruit_GFX.cpp.

## ◆ drawBitmap() [4/4]

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
| ) |  |

Definition at line 490 of file Adafruit_GFX.cpp.

## ◆ drawChar()

void Adafruit_GFX::drawChar | ( | int16_t | x,
|  | int16_t | y,
|  | unsigned char | c,
|  | uint16_t | color,
|  | uint16_t | bg,
|  | uint8_t | size
| ) |  |

Definition at line 603 of file Adafruit_GFX.cpp.

## ◆ drawCircle()

void Adafruit_GFX::drawCircle | ( | int16_t | x0,
|  | int16_t | y0,
|  | int16_t | r,
|  | uint16_t | color
| ) |  |

Definition at line 88 of file Adafruit_GFX.cpp.

## ◆ drawCircleHelper()

void Adafruit_GFX::drawCircleHelper | ( | int16_t | x0,
|  | int16_t | y0,
|  | int16_t | r,
|  | uint8_t | cornername,
|  | uint16_t | color
| ) |  |

Definition at line 125 of file Adafruit_GFX.cpp.

## ◆ drawFastHLine()

void Adafruit_GFX::drawFastHLine | ( | int16_t | x,
|  | int16_t | y,
|  | int16_t | w,
|  | uint16_t | color
| ) |  |

Definition at line 280 of file Adafruit_GFX.cpp.

## ◆ drawFastVLine()

void Adafruit_GFX::drawFastVLine | ( | int16_t | x,
|  | int16_t | y,
|  | int16_t | h,
|  | uint16_t | color
| ) |  |

Definition at line 273 of file Adafruit_GFX.cpp.

## ◆ drawLine()

void Adafruit_GFX::drawLine | ( | int16_t | x0,
|  | int16_t | y0,
|  | int16_t | x1,
|  | int16_t | y1,
|  | uint16_t | color
| ) |  |
| virtual

Definition at line 212 of file Adafruit_GFX.cpp.

## ◆ drawPixel()

virtual void Adafruit_GFX::drawPixel | ( | int16_t | x,
|  | int16_t | y,
|  | uint16_t | color
| ) |  |
| pure virtual

Implemented in GFXcanvas1, and Adafruit_ILI9341.

## ◆ drawRect()

void Adafruit_GFX::drawRect | ( | int16_t | x,
|  | int16_t | y,
|  | int16_t | w,
|  | int16_t | h,
|  | uint16_t | color
| ) |  |

Definition at line 264 of file Adafruit_GFX.cpp.

## ◆ drawRoundRect()

void Adafruit_GFX::drawRoundRect | ( | int16_t | x0,
|  | int16_t | y0,
|  | int16_t | w,
|  | int16_t | h,
|  | int16_t | radius,
|  | uint16_t | color
| ) |  |

Definition at line 303 of file Adafruit_GFX.cpp.

## ◆ drawTriangle()

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
| ) |  |

Definition at line 331 of file Adafruit_GFX.cpp.

## ◆ drawXBitmap()

void Adafruit_GFX::drawXBitmap | ( | int16_t | x,
|  | int16_t | y,
|  | const uint8_t * | bitmap,
|  | int16_t | w,
|  | int16_t | h,
|  | uint16_t | color
| ) |  |

Definition at line 512 of file Adafruit_GFX.cpp.

## ◆ fillCircle()

void Adafruit_GFX::fillCircle | ( | int16_t | x0,
|  | int16_t | y0,
|  | int16_t | r,
|  | uint16_t | color
| ) |  |

Definition at line 168 of file Adafruit_GFX.cpp.

## ◆ fillCircleHelper()

void Adafruit_GFX::fillCircleHelper | ( | int16_t | x0,
|  | int16_t | y0,
|  | int16_t | r,
|  | uint8_t | cornername,
|  | int16_t | delta,
|  | uint16_t | color
| ) |  |

Definition at line 176 of file Adafruit_GFX.cpp.

## ◆ fillRect()

void Adafruit_GFX::fillRect | ( | int16_t | x,
|  | int16_t | y,
|  | int16_t | w,
|  | int16_t | h,
|  | uint16_t | color
| ) |  |

Definition at line 287 of file Adafruit_GFX.cpp.

## ◆ fillRoundRect()

void Adafruit_GFX::fillRoundRect | ( | int16_t | x0,
|  | int16_t | y0,
|  | int16_t | w,
|  | int16_t | h,
|  | int16_t | radius,
|  | uint16_t | color
| ) |  |

Definition at line 319 of file Adafruit_GFX.cpp.

## ◆ fillScreen()

void Adafruit_GFX::fillScreen | ( | uint16_t | color | ) |

Definition at line 297 of file Adafruit_GFX.cpp.

## ◆ fillTriangle()

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
| ) |  |

Definition at line 340 of file Adafruit_GFX.cpp.

## ◆ getCursorX()

int16_t Adafruit_GFX::getCursorX | ( | void |  | ) | const

Definition at line 715 of file Adafruit_GFX.cpp.

## ◆ getCursorY()

int16_t Adafruit_GFX::getCursorY | ( | void |  | ) | const

Definition at line 720 of file Adafruit_GFX.cpp.

## ◆ getRotation()

uint8_t Adafruit_GFX::getRotation | ( | void |  | ) | const

Definition at line 748 of file Adafruit_GFX.cpp.

## ◆ getTextBounds() [1/2]

void Adafruit_GFX::getTextBounds | ( | char * | string,
|  | int16_t | x,
|  | int16_t | y,
|  | int16_t * | x1,
|  | int16_t * | y1,
|  | uint16_t * | w,
|  | uint16_t * | h
| ) |  |

Definition at line 804 of file Adafruit_GFX.cpp.

## ◆ getTextBounds() [2/2]

void Adafruit_GFX::getTextBounds | ( | const __FlashStringHelper * | s,
|  | int16_t | x,
|  | int16_t | y,
|  | int16_t * | x1,
|  | int16_t * | y1,
|  | uint16_t * | w,
|  | uint16_t * | h
| ) |  |

Definition at line 912 of file Adafruit_GFX.cpp.

## ◆ height()

int16_t Adafruit_GFX::height | ( | void |  | ) | const

Definition at line 1025 of file Adafruit_GFX.cpp.

## ◆ invertDisplay()

void Adafruit_GFX::invertDisplay | ( | boolean | i | ) |

Definition at line 1030 of file Adafruit_GFX.cpp.

## ◆ setCursor()

void Adafruit_GFX::setCursor | ( | int16_t | x,
|  | int16_t | y
| ) |  |

Definition at line 709 of file Adafruit_GFX.cpp.

## ◆ setFont()

void Adafruit_GFX::setFont | ( | const GFXfont * | f = `NULL` | ) |

Definition at line 783 of file Adafruit_GFX.cpp.

## ◆ setRotation()

void Adafruit_GFX::setRotation | ( | uint8_t | r | ) |

Definition at line 753 of file Adafruit_GFX.cpp.

## ◆ setTextColor() [1/2]

void Adafruit_GFX::setTextColor | ( | uint16_t | c | ) |

Definition at line 730 of file Adafruit_GFX.cpp.

## ◆ setTextColor() [2/2]

void Adafruit_GFX::setTextColor | ( | uint16_t | c,
|  | uint16_t | bg
| ) |  |

Definition at line 737 of file Adafruit_GFX.cpp.

## ◆ setTextSize()

void Adafruit_GFX::setTextSize | ( | uint8_t | s | ) |

Definition at line 725 of file Adafruit_GFX.cpp.

## ◆ setTextWrap()

void Adafruit_GFX::setTextWrap | ( | boolean | w | ) |

Definition at line 743 of file Adafruit_GFX.cpp.

## ◆ width()

int16_t Adafruit_GFX::width | ( | void |  | ) | const

Definition at line 1020 of file Adafruit_GFX.cpp.

## ◆ write()

void Adafruit_GFX::write | ( | uint8_t | c | ) |
| virtual

Definition at line 534 of file Adafruit_GFX.cpp.

## Constructor & Destructor Documentation

## ◆ Adafruit_GFX()

Adafruit_GFX::Adafruit_GFX | ( | int16_t | w,
|  | int16_t | h
| ) |  |

Definition at line 73 of file Adafruit_GFX.cpp.

## Field Documentation

## ◆ _cp437

boolean Adafruit_GFX::_cp437
| protected

Definition at line 102 of file Adafruit_GFX.h.

## ◆ _height

int16_t Adafruit_GFX::_height
| protected

Definition at line 94 of file Adafruit_GFX.h.

## ◆ _width

int16_t Adafruit_GFX::_width
| protected

Definition at line 94 of file Adafruit_GFX.h.

## ◆ cursor_x

int16_t Adafruit_GFX::cursor_x
| protected

Definition at line 94 of file Adafruit_GFX.h.

## ◆ cursor_y

int16_t Adafruit_GFX::cursor_y
| protected

Definition at line 94 of file Adafruit_GFX.h.

## ◆ gfxFont

GFXfont* Adafruit_GFX::gfxFont
| protected

Definition at line 105 of file Adafruit_GFX.h.

## ◆ HEIGHT

const int16_t Adafruit_GFX::HEIGHT
| protected

Definition at line 92 of file Adafruit_GFX.h.

## ◆ rotation

uint8_t Adafruit_GFX::rotation
| protected

Definition at line 99 of file Adafruit_GFX.h.

## ◆ textbgcolor

uint16_t Adafruit_GFX::textbgcolor
| protected

Definition at line 97 of file Adafruit_GFX.h.

## ◆ textcolor

uint16_t Adafruit_GFX::textcolor
| protected

Definition at line 97 of file Adafruit_GFX.h.

## ◆ textsize

uint8_t Adafruit_GFX::textsize
| protected

Definition at line 99 of file Adafruit_GFX.h.

## ◆ WIDTH

const int16_t Adafruit_GFX::WIDTH
| protected

Definition at line 92 of file Adafruit_GFX.h.

## ◆ wrap

boolean Adafruit_GFX::wrap
| protected

Definition at line 102 of file Adafruit_GFX.h.

The documentation for this class was generated from the following files:

- Adafruit_GFX.h
- Adafruit_GFX.cpp