Arduino  1.8.10
Adafruit_GFX クラスabstract

#include <Adafruit_GFX.h>

Adafruit_GFX の継承関係図
Print Print Adafruit_ST7735 Arduino_LCD TFT RobotControl

公開メンバ関数

 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 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)
 
virtual void write (uint8_t)
 
int16_t height (void)
 
int16_t width (void)
 
uint8_t getRotation (void)
 
virtual uint16_t newColor (uint8_t red, uint8_t green, uint8_t blue)
 
void background (uint8_t red, uint8_t green, uint8_t blue)
 
void background (color c)
 
void fill (uint8_t red, uint8_t green, uint8_t blue)
 
void fill (color c)
 
void noFill ()
 
void stroke (uint8_t red, uint8_t green, uint8_t blue)
 
void stroke (color c)
 
void noStroke ()
 
void text (const char *text, int16_t x, int16_t y)
 
void text (int value, uint8_t posX, uint8_t posY)
 
void text (long value, uint8_t posX, uint8_t posY)
 
void text (char value, uint8_t posX, uint8_t posY)
 
void textWrap (const char *text, int16_t x, int16_t y)
 
void textSize (uint8_t size)
 
void circle (int16_t x, int16_t y, int16_t r)
 
void point (int16_t x, int16_t y)
 
void line (int16_t x1, int16_t y1, int16_t x2, int16_t y2)
 
void quad (int16_t x1, int16_t y1, int16_t x2, int16_t y2, int16_t x3, int16_t y3, int16_t x4, int16_t y4)
 
void rect (int16_t x, int16_t y, int16_t width, int16_t height)
 
void rect (int16_t x, int16_t y, int16_t width, int16_t height, int16_t radius)
 
void triangle (int16_t x1, int16_t y1, int16_t x2, int16_t y2, int16_t x3, int16_t y3)
 
 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 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)
 
virtual void write (uint8_t)
 
int16_t height (void)
 
int16_t width (void)
 
uint8_t getRotation (void)
 
virtual uint16_t newColor (uint8_t red, uint8_t green, uint8_t blue)
 
void background (uint8_t red, uint8_t green, uint8_t blue)
 
void background (color c)
 
void fill (uint8_t red, uint8_t green, uint8_t blue)
 
void fill (color c)
 
void noFill ()
 
void stroke (uint8_t red, uint8_t green, uint8_t blue)
 
void stroke (color c)
 
void noStroke ()
 
void text (const char *text, int16_t x, int16_t y)
 
void textWrap (const char *text, int16_t x, int16_t y)
 
void textSize (uint8_t size)
 
void circle (int16_t x, int16_t y, int16_t r)
 
void point (int16_t x, int16_t y)
 
void line (int16_t x1, int16_t y1, int16_t x2, int16_t y2)
 
void quad (int16_t x1, int16_t y1, int16_t x2, int16_t y2, int16_t x3, int16_t y3, int16_t x4, int16_t y4)
 
void rect (int16_t x, int16_t y, int16_t width, int16_t height)
 
void rect (int16_t x, int16_t y, int16_t width, int16_t height, int16_t radius)
 
void triangle (int16_t x1, int16_t y1, int16_t x2, int16_t y2, int16_t x3, int16_t y3)
 
- 基底クラス Print に属する継承公開メンバ関数
 Print ()
 
int getWriteError ()
 
void clearWriteError ()
 
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)
 
virtual int availableForWrite ()
 
size_t print (const __FlashStringHelper *)
 
size_t print (const String &)
 
size_t print (const char[])
 
size_t print (char)
 
size_t print (unsigned char, int=DEC)
 
size_t print (int, int=DEC)
 
size_t print (unsigned int, int=DEC)
 
size_t print (long, int=DEC)
 
size_t print (unsigned long, int=DEC)
 
size_t print (double, int=2)
 
size_t print (const Printable &)
 
size_t println (const __FlashStringHelper *)
 
size_t println (const String &s)
 
size_t println (const char[])
 
size_t println (char)
 
size_t println (unsigned char, int=DEC)
 
size_t println (int, int=DEC)
 
size_t println (unsigned int, int=DEC)
 
size_t println (long, int=DEC)
 
size_t println (unsigned long, int=DEC)
 
size_t println (double, int=2)
 
size_t println (const Printable &)
 
size_t println (void)
 
virtual void flush ()
 

限定公開変数類

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
 
color strokeColor
 
bool useStroke
 
color fillColor
 
bool useFill
 
int16_t WIDTH
 
int16_t HEIGHT
 

その他の継承メンバ

- 基底クラス Print に属する継承限定公開メンバ関数
void setWriteError (int err=1)
 

詳解

Adafruit_GFX.h41 行目に定義があります。

構築子と解体子

◆ Adafruit_GFX() [1/2]

Adafruit_GFX::Adafruit_GFX ( int16_t  w,
int16_t  h 
)

Adafruit_GFX.cpp42 行目に定義があります。

42  :
43  WIDTH(w), HEIGHT(h)
44 {
45  _width = WIDTH;
46  _height = HEIGHT;
47  rotation = 0;
48  cursor_y = cursor_x = 0;
49  textsize = 1;
50  textcolor = textbgcolor = 0xFFFF;
51  wrap = true;
52 }
boolean wrap
Definition: Adafruit_GFX.h:178
const int16_t WIDTH
Definition: Adafruit_GFX.h:168
int16_t cursor_y
Definition: Adafruit_GFX.h:170
uint8_t textsize
Definition: Adafruit_GFX.h:175
uint16_t textbgcolor
Definition: Adafruit_GFX.h:173
int16_t cursor_x
Definition: Adafruit_GFX.h:170
int16_t _height
Definition: Adafruit_GFX.h:170
int16_t _width
Definition: Adafruit_GFX.h:170
uint8_t rotation
Definition: Adafruit_GFX.h:175
uint16_t textcolor
Definition: Adafruit_GFX.h:173
const int16_t HEIGHT
Definition: Adafruit_GFX.h:168

◆ Adafruit_GFX() [2/2]

Adafruit_GFX::Adafruit_GFX ( int16_t  w,
int16_t  h 
)

関数詳解

◆ background() [1/4]

void Adafruit_GFX::background ( uint8_t  red,
uint8_t  green,
uint8_t  blue 
)

Adafruit_GFX.cpp485 行目に定義があります。

485  {
486  background(newColor(red, green, blue));
487 }
void background(uint8_t red, uint8_t green, uint8_t blue)
virtual uint16_t newColor(uint8_t red, uint8_t green, uint8_t blue)

◆ background() [2/4]

void Adafruit_GFX::background ( color  c)

Adafruit_GFX.cpp489 行目に定義があります。

489  {
490  fillScreen(c);
491 }
virtual void fillScreen(uint16_t color)

◆ background() [3/4]

void Adafruit_GFX::background ( uint8_t  red,
uint8_t  green,
uint8_t  blue 
)

◆ background() [4/4]

void Adafruit_GFX::background ( color  c)

◆ circle() [1/2]

void Adafruit_GFX::circle ( int16_t  x,
int16_t  y,
int16_t  r 
)

Adafruit_GFX.cpp616 行目に定義があります。

616  {
617  if (r == 0)
618  return;
619 
620  if (useFill) {
621  fillCircle(x, y, r, fillColor);
622  }
623  if (useStroke) {
624  drawCircle(x, y, r, strokeColor);
625  }
626 }
void fillCircle(int16_t x0, int16_t y0, int16_t r, uint16_t color)
color strokeColor
Definition: Adafruit_GFX.h:184
void drawCircle(int16_t x0, int16_t y0, int16_t r, uint16_t color)

◆ circle() [2/2]

void Adafruit_GFX::circle ( int16_t  x,
int16_t  y,
int16_t  r 
)

◆ drawBitmap() [1/2]

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

Adafruit_GFX.cpp351 行目に定義があります。

353  {
354 
355  int16_t i, j, byteWidth = (w + 7) / 8;
356 
357  for(j=0; j<h; j++) {
358  for(i=0; i<w; i++ ) {
359  if(pgm_read_byte(bitmap + j * byteWidth + i / 8) & (128 >> (i & 7))) {
360  drawPixel(x+i, y+j, color);
361  }
362  }
363  }
364 }
virtual void drawPixel(int16_t x, int16_t y, uint16_t color)=0
uint8_t i
#define pgm_read_byte(addr)
uint16_t color
Definition: Adafruit_GFX.h:39

◆ drawBitmap() [2/2]

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

◆ drawChar() [1/2]

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

Adafruit_GFX.cpp390 行目に定義があります。

391  {
392 
393  if((x >= _width) || // Clip right
394  (y >= _height) || // Clip bottom
395  ((x + 6 * size - 1) < 0) || // Clip left
396  ((y + 8 * size - 1) < 0)) // Clip top
397  return;
398 
399  for (int8_t i=0; i<6; i++ ) {
400  uint8_t line;
401  if (i == 5)
402  line = 0x0;
403  else
404  line = pgm_read_byte(font+(c*5)+i);
405  for (int8_t j = 0; j<8; j++) {
406  if (line & 0x1) {
407  if (size == 1) // default size
408  drawPixel(x+i, y+j, color);
409  else { // big size
410  fillRect(x+(i*size), y+(j*size), size, size, color);
411  }
412  } else if (bg != color) {
413  if (size == 1) // default size
414  drawPixel(x+i, y+j, bg);
415  else { // big size
416  fillRect(x+i*size, y+j*size, size, size, bg);
417  }
418  }
419  line >>= 1;
420  }
421  }
422 }
virtual void drawPixel(int16_t x, int16_t y, uint16_t color)=0
uint8_t i
#define pgm_read_byte(addr)
void line(int16_t x1, int16_t y1, int16_t x2, int16_t y2)
virtual void fillRect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color)
int16_t _height
Definition: Adafruit_GFX.h:170
uint16_t color
Definition: Adafruit_GFX.h:39
int16_t _width
Definition: Adafruit_GFX.h:170

◆ drawChar() [2/2]

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

◆ drawCircle() [1/2]

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

Adafruit_GFX.cpp55 行目に定義があります。

56  {
57  int16_t f = 1 - r;
58  int16_t ddF_x = 1;
59  int16_t ddF_y = -2 * r;
60  int16_t x = 0;
61  int16_t y = r;
62 
63  drawPixel(x0 , y0+r, color);
64  drawPixel(x0 , y0-r, color);
65  drawPixel(x0+r, y0 , color);
66  drawPixel(x0-r, y0 , color);
67 
68  while (x<y) {
69  if (f >= 0) {
70  y--;
71  ddF_y += 2;
72  f += ddF_y;
73  }
74  x++;
75  ddF_x += 2;
76  f += ddF_x;
77 
78  drawPixel(x0 + x, y0 + y, color);
79  drawPixel(x0 - x, y0 + y, color);
80  drawPixel(x0 + x, y0 - y, color);
81  drawPixel(x0 - x, y0 - y, color);
82  drawPixel(x0 + y, y0 + x, color);
83  drawPixel(x0 - y, y0 + x, color);
84  drawPixel(x0 + y, y0 - x, color);
85  drawPixel(x0 - y, y0 - x, color);
86  }
87 }
virtual void drawPixel(int16_t x, int16_t y, uint16_t color)=0
uint16_t color
Definition: Adafruit_GFX.h:39
unsigned char f
Definition: wiring.c:51

◆ drawCircle() [2/2]

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

◆ drawCircleHelper() [1/2]

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

Adafruit_GFX.cpp89 行目に定義があります。

90  {
91  int16_t f = 1 - r;
92  int16_t ddF_x = 1;
93  int16_t ddF_y = -2 * r;
94  int16_t x = 0;
95  int16_t y = r;
96 
97  while (x<y) {
98  if (f >= 0) {
99  y--;
100  ddF_y += 2;
101  f += ddF_y;
102  }
103  x++;
104  ddF_x += 2;
105  f += ddF_x;
106  if (cornername & 0x4) {
107  drawPixel(x0 + x, y0 + y, color);
108  drawPixel(x0 + y, y0 + x, color);
109  }
110  if (cornername & 0x2) {
111  drawPixel(x0 + x, y0 - y, color);
112  drawPixel(x0 + y, y0 - x, color);
113  }
114  if (cornername & 0x8) {
115  drawPixel(x0 - y, y0 + x, color);
116  drawPixel(x0 - x, y0 + y, color);
117  }
118  if (cornername & 0x1) {
119  drawPixel(x0 - y, y0 - x, color);
120  drawPixel(x0 - x, y0 - y, color);
121  }
122  }
123 }
virtual void drawPixel(int16_t x, int16_t y, uint16_t color)=0
uint16_t color
Definition: Adafruit_GFX.h:39
unsigned char f
Definition: wiring.c:51

◆ drawCircleHelper() [2/2]

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

◆ drawFastHLine() [1/2]

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

Adafruit_GFX.cpp220 行目に定義があります。

221  {
222  // Update in subclasses if desired!
223  drawLine(x, y, x+w-1, y, color);
224 }
uint16_t color
Definition: Adafruit_GFX.h:39
virtual void drawLine(int16_t x0, int16_t y0, int16_t x1, int16_t y1, uint16_t color)

◆ drawFastHLine() [2/2]

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

◆ drawFastVLine() [1/2]

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

Adafruit_GFX.cpp214 行目に定義があります。

215  {
216  // Update in subclasses if desired!
217  drawLine(x, y, x, y+h-1, color);
218 }
uint16_t color
Definition: Adafruit_GFX.h:39
virtual void drawLine(int16_t x0, int16_t y0, int16_t x1, int16_t y1, uint16_t color)

◆ drawFastVLine() [2/2]

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

◆ drawLine() [1/2]

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

Adafruit_GFX.cpp163 行目に定義があります。

165  {
166  int16_t steep = abs(y1 - y0) > abs(x1 - x0);
167  if (steep) {
168  swap(x0, y0);
169  swap(x1, y1);
170  }
171 
172  if (x0 > x1) {
173  swap(x0, x1);
174  swap(y0, y1);
175  }
176 
177  int16_t dx, dy;
178  dx = x1 - x0;
179  dy = abs(y1 - y0);
180 
181  int16_t err = dx / 2;
182  int16_t ystep;
183 
184  if (y0 < y1) {
185  ystep = 1;
186  } else {
187  ystep = -1;
188  }
189 
190  for (; x0<=x1; x0++) {
191  if (steep) {
192  drawPixel(y0, x0, color);
193  } else {
194  drawPixel(x0, y0, color);
195  }
196  err -= dy;
197  if (err < 0) {
198  y0 += ystep;
199  err += dx;
200  }
201  }
202 }
int abs(int __i) __ATTR_CONST__
virtual void drawPixel(int16_t x, int16_t y, uint16_t color)=0
#define swap(a, b)
Definition: Adafruit_GFX.h:28
uint16_t color
Definition: Adafruit_GFX.h:39

◆ drawLine() [2/2]

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

◆ drawPixel() [1/2]

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

Adafruit_ST7735, Arduino_LCDで実装されています。

◆ drawPixel() [2/2]

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

Adafruit_ST7735, Arduino_LCDで実装されています。

◆ drawRect() [1/2]

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

Adafruit_GFX.cpp205 行目に定義があります。

207  {
208  drawFastHLine(x, y, w, color);
209  drawFastHLine(x, y+h-1, w, color);
210  drawFastVLine(x, y, h, color);
211  drawFastVLine(x+w-1, y, h, color);
212 }
uint16_t color
Definition: Adafruit_GFX.h:39
virtual void drawFastHLine(int16_t x, int16_t y, int16_t w, uint16_t color)
virtual void drawFastVLine(int16_t x, int16_t y, int16_t h, uint16_t color)

◆ drawRect() [2/2]

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

◆ drawRoundRect() [1/2]

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

Adafruit_GFX.cpp239 行目に定義があります。

240  {
241  // smarter version
242  drawFastHLine(x+r , y , w-2*r, color); // Top
243  drawFastHLine(x+r , y+h-1, w-2*r, color); // Bottom
244  drawFastVLine(x , y+r , h-2*r, color); // Left
245  drawFastVLine(x+w-1, y+r , h-2*r, color); // Right
246  // draw four corners
247  drawCircleHelper(x+r , y+r , r, 1, color);
248  drawCircleHelper(x+w-r-1, y+r , r, 2, color);
249  drawCircleHelper(x+w-r-1, y+h-r-1, r, 4, color);
250  drawCircleHelper(x+r , y+h-r-1, r, 8, color);
251 }
void drawCircleHelper(int16_t x0, int16_t y0, int16_t r, uint8_t cornername, uint16_t color)
uint16_t color
Definition: Adafruit_GFX.h:39
virtual void drawFastHLine(int16_t x, int16_t y, int16_t w, uint16_t color)
virtual void drawFastVLine(int16_t x, int16_t y, int16_t h, uint16_t color)

◆ drawRoundRect() [2/2]

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

◆ drawTriangle() [1/2]

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 
)

Adafruit_GFX.cpp265 行目に定義があります。

267  {
268  drawLine(x0, y0, x1, y1, color);
269  drawLine(x1, y1, x2, y2, color);
270  drawLine(x2, y2, x0, y0, color);
271 }
uint16_t color
Definition: Adafruit_GFX.h:39
virtual void drawLine(int16_t x0, int16_t y0, int16_t x1, int16_t y1, uint16_t color)

◆ drawTriangle() [2/2]

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 
)

◆ fill() [1/4]

void Adafruit_GFX::fill ( uint8_t  red,
uint8_t  green,
uint8_t  blue 
)

Adafruit_GFX.cpp511 行目に定義があります。

511  {
512  fill(newColor(red, green, blue));
513 }
void fill(uint8_t red, uint8_t green, uint8_t blue)
virtual uint16_t newColor(uint8_t red, uint8_t green, uint8_t blue)

◆ fill() [2/4]

void Adafruit_GFX::fill ( color  c)

Adafruit_GFX.cpp515 行目に定義があります。

515  {
516  useFill = true;
517  fillColor = c;
518 }

◆ fill() [3/4]

void Adafruit_GFX::fill ( uint8_t  red,
uint8_t  green,
uint8_t  blue 
)

◆ fill() [4/4]

void Adafruit_GFX::fill ( color  c)

◆ fillCircle() [1/2]

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

Adafruit_GFX.cpp125 行目に定義があります。

126  {
127  drawFastVLine(x0, y0-r, 2*r+1, color);
128  fillCircleHelper(x0, y0, r, 3, 0, color);
129 }
void fillCircleHelper(int16_t x0, int16_t y0, int16_t r, uint8_t cornername, int16_t delta, uint16_t color)
uint16_t color
Definition: Adafruit_GFX.h:39
virtual void drawFastVLine(int16_t x, int16_t y, int16_t h, uint16_t color)

◆ fillCircle() [2/2]

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

◆ fillCircleHelper() [1/2]

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

Adafruit_GFX.cpp132 行目に定義があります。

133  {
134 
135  int16_t f = 1 - r;
136  int16_t ddF_x = 1;
137  int16_t ddF_y = -2 * r;
138  int16_t x = 0;
139  int16_t y = r;
140 
141  while (x<y) {
142  if (f >= 0) {
143  y--;
144  ddF_y += 2;
145  f += ddF_y;
146  }
147  x++;
148  ddF_x += 2;
149  f += ddF_x;
150 
151  if (cornername & 0x1) {
152  drawFastVLine(x0+x, y0-y, 2*y+1+delta, color);
153  drawFastVLine(x0+y, y0-x, 2*x+1+delta, color);
154  }
155  if (cornername & 0x2) {
156  drawFastVLine(x0-x, y0-y, 2*y+1+delta, color);
157  drawFastVLine(x0-y, y0-x, 2*x+1+delta, color);
158  }
159  }
160 }
uint16_t color
Definition: Adafruit_GFX.h:39
virtual void drawFastVLine(int16_t x, int16_t y, int16_t h, uint16_t color)
unsigned char f
Definition: wiring.c:51

◆ fillCircleHelper() [2/2]

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

◆ fillRect() [1/2]

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

Adafruit_GFX.cpp226 行目に定義があります。

227  {
228  // Update in subclasses if desired!
229  for (int16_t i=x; i<x+w; i++) {
230  drawFastVLine(i, y, h, color);
231  }
232 }
uint8_t i
uint16_t color
Definition: Adafruit_GFX.h:39
virtual void drawFastVLine(int16_t x, int16_t y, int16_t h, uint16_t color)

◆ fillRect() [2/2]

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

◆ fillRoundRect() [1/2]

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

Adafruit_GFX.cpp254 行目に定義があります。

255  {
256  // smarter version
257  fillRect(x+r, y, w-2*r, h, color);
258 
259  // draw four corners
260  fillCircleHelper(x+w-r-1, y+r, r, 1, h-2*r-1, color);
261  fillCircleHelper(x+r , y+r, r, 2, h-2*r-1, color);
262 }
void fillCircleHelper(int16_t x0, int16_t y0, int16_t r, uint8_t cornername, int16_t delta, uint16_t color)
virtual void fillRect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color)
uint16_t color
Definition: Adafruit_GFX.h:39

◆ fillRoundRect() [2/2]

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

◆ fillScreen() [1/2]

void Adafruit_GFX::fillScreen ( uint16_t  color)

Adafruit_GFX.cpp234 行目に定義があります。

234  {
235  fillRect(0, 0, _width, _height, color);
236 }
virtual void fillRect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color)
int16_t _height
Definition: Adafruit_GFX.h:170
uint16_t color
Definition: Adafruit_GFX.h:39
int16_t _width
Definition: Adafruit_GFX.h:170

◆ fillScreen() [2/2]

virtual void Adafruit_GFX::fillScreen ( uint16_t  color)

◆ fillTriangle() [1/2]

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 
)

Adafruit_GFX.cpp274 行目に定義があります。

276  {
277 
278  int16_t a, b, y, last;
279 
280  // Sort coordinates by Y order (y2 >= y1 >= y0)
281  if (y0 > y1) {
282  swap(y0, y1); swap(x0, x1);
283  }
284  if (y1 > y2) {
285  swap(y2, y1); swap(x2, x1);
286  }
287  if (y0 > y1) {
288  swap(y0, y1); swap(x0, x1);
289  }
290 
291  if(y0 == y2) { // Handle awkward all-on-same-line case as its own thing
292  a = b = x0;
293  if(x1 < a) a = x1;
294  else if(x1 > b) b = x1;
295  if(x2 < a) a = x2;
296  else if(x2 > b) b = x2;
297  drawFastHLine(a, y0, b-a+1, color);
298  return;
299  }
300 
301  int16_t
302  dx01 = x1 - x0,
303  dy01 = y1 - y0,
304  dx02 = x2 - x0,
305  dy02 = y2 - y0,
306  dx12 = x2 - x1,
307  dy12 = y2 - y1,
308  sa = 0,
309  sb = 0;
310 
311  // For upper part of triangle, find scanline crossings for segments
312  // 0-1 and 0-2. If y1=y2 (flat-bottomed triangle), the scanline y1
313  // is included here (and second loop will be skipped, avoiding a /0
314  // error there), otherwise scanline y1 is skipped here and handled
315  // in the second loop...which also avoids a /0 error here if y0=y1
316  // (flat-topped triangle).
317  if(y1 == y2) last = y1; // Include y1 scanline
318  else last = y1-1; // Skip it
319 
320  for(y=y0; y<=last; y++) {
321  a = x0 + sa / dy01;
322  b = x0 + sb / dy02;
323  sa += dx01;
324  sb += dx02;
325  /* longhand:
326  a = x0 + (x1 - x0) * (y - y0) / (y1 - y0);
327  b = x0 + (x2 - x0) * (y - y0) / (y2 - y0);
328  */
329  if(a > b) swap(a,b);
330  drawFastHLine(a, y, b-a+1, color);
331  }
332 
333  // For lower part of triangle, find scanline crossings for segments
334  // 0-2 and 1-2. This loop is skipped if y1=y2.
335  sa = dx12 * (y - y1);
336  sb = dx02 * (y - y0);
337  for(; y<=y2; y++) {
338  a = x1 + sa / dy12;
339  b = x0 + sb / dy02;
340  sa += dx12;
341  sb += dx02;
342  /* longhand:
343  a = x1 + (x2 - x1) * (y - y1) / (y2 - y1);
344  b = x0 + (x2 - x0) * (y - y0) / (y2 - y0);
345  */
346  if(a > b) swap(a,b);
347  drawFastHLine(a, y, b-a+1, color);
348  }
349 }
#define swap(a, b)
Definition: Adafruit_GFX.h:28
uint16_t color
Definition: Adafruit_GFX.h:39
virtual void drawFastHLine(int16_t x, int16_t y, int16_t w, uint16_t color)

◆ fillTriangle() [2/2]

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 
)

◆ getRotation() [1/2]

uint8_t Adafruit_GFX::getRotation ( void  )

Adafruit_GFX.cpp448 行目に定義があります。

448  {
449  return rotation;
450 }
uint8_t rotation
Definition: Adafruit_GFX.h:175

◆ getRotation() [2/2]

uint8_t Adafruit_GFX::getRotation ( void  )

◆ height() [1/2]

int16_t Adafruit_GFX::height ( void  )

Adafruit_GFX.cpp473 行目に定義があります。

473  {
474  return _height;
475 }
int16_t _height
Definition: Adafruit_GFX.h:170

◆ height() [2/2]

int16_t Adafruit_GFX::height ( void  )

◆ invertDisplay() [1/2]

void Adafruit_GFX::invertDisplay ( boolean  i)

Adafruit_GFX.cpp477 行目に定義があります。

477  {
478  // Do nothing, must be subclassed if supported
479 }

◆ invertDisplay() [2/2]

virtual void Adafruit_GFX::invertDisplay ( boolean  i)

◆ line() [1/2]

void Adafruit_GFX::line ( int16_t  x1,
int16_t  y1,
int16_t  x2,
int16_t  y2 
)

Adafruit_GFX.cpp580 行目に定義があります。

580  {
581  if (!useStroke)
582  return;
583 
584  if (x1 == x2) {
585  drawFastVLine(x1, y1, y2 - y1, strokeColor);
586  }
587  else if (y1 == y2) {
588  drawFastHLine(x1, y1, x2 - x1, strokeColor);
589  }
590  else {
591  drawLine(x1, y1, x2, y2, strokeColor);
592  }
593 }
virtual void drawFastHLine(int16_t x, int16_t y, int16_t w, uint16_t color)
color strokeColor
Definition: Adafruit_GFX.h:184
virtual void drawFastVLine(int16_t x, int16_t y, int16_t h, uint16_t color)
virtual void drawLine(int16_t x0, int16_t y0, int16_t x1, int16_t y1, uint16_t color)

◆ line() [2/2]

void Adafruit_GFX::line ( int16_t  x1,
int16_t  y1,
int16_t  x2,
int16_t  y2 
)

◆ newColor() [1/2]

uint16_t Adafruit_GFX::newColor ( uint8_t  red,
uint8_t  green,
uint8_t  blue 
)
virtual

transforms a color in 16-bit form given the RGB components. The default implementation makes a 5-bit red, a 6-bit green and a 5-bit blue (MSB to LSB). Devices that use different scheme should override this.

Adafruit_GFX.cpp481 行目に定義があります。

481  {
482  return ((r & 0xF8) << 8) | ((g & 0xFC) << 3) | (b >> 3);
483 }

◆ newColor() [2/2]

virtual uint16_t Adafruit_GFX::newColor ( uint8_t  red,
uint8_t  green,
uint8_t  blue 
)
virtual

transforms a color in 16-bit form given the RGB components. The default implementation makes a 5-bit red, a 6-bit green and a 5-bit blue (MSB to LSB). Devices that use different scheme should override this.

◆ noFill() [1/2]

void Adafruit_GFX::noFill ( )

Adafruit_GFX.cpp507 行目に定義があります。

507  {
508  useFill = false;
509 }

◆ noFill() [2/2]

void Adafruit_GFX::noFill ( )

◆ noStroke() [1/2]

void Adafruit_GFX::noStroke ( )

Adafruit_GFX.cpp503 行目に定義があります。

503  {
504  useStroke = false;
505 }

◆ noStroke() [2/2]

void Adafruit_GFX::noStroke ( )

◆ point() [1/2]

void Adafruit_GFX::point ( int16_t  x,
int16_t  y 
)

Adafruit_GFX.cpp573 行目に定義があります。

573  {
574  if (!useStroke)
575  return;
576 
577  drawPixel(x, y, strokeColor);
578 }
virtual void drawPixel(int16_t x, int16_t y, uint16_t color)=0
color strokeColor
Definition: Adafruit_GFX.h:184

◆ point() [2/2]

void Adafruit_GFX::point ( int16_t  x,
int16_t  y 
)

◆ quad() [1/2]

void Adafruit_GFX::quad ( int16_t  x1,
int16_t  y1,
int16_t  x2,
int16_t  y2,
int16_t  x3,
int16_t  y3,
int16_t  x4,
int16_t  y4 
)

◆ quad() [2/2]

void Adafruit_GFX::quad ( int16_t  x1,
int16_t  y1,
int16_t  x2,
int16_t  y2,
int16_t  x3,
int16_t  y3,
int16_t  x4,
int16_t  y4 
)

◆ rect() [1/4]

void Adafruit_GFX::rect ( int16_t  x,
int16_t  y,
int16_t  width,
int16_t  height 
)

Adafruit_GFX.cpp595 行目に定義があります。

595  {
596  if (useFill) {
597  fillRect(x, y, width, height, fillColor);
598  }
599  if (useStroke) {
600  drawRect(x, y, width, height, strokeColor);
601  }
602 }
int16_t width(void)
virtual void fillRect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color)
color strokeColor
Definition: Adafruit_GFX.h:184
virtual void drawRect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color)
int16_t height(void)

◆ rect() [2/4]

void Adafruit_GFX::rect ( int16_t  x,
int16_t  y,
int16_t  width,
int16_t  height,
int16_t  radius 
)

Adafruit_GFX.cpp604 行目に定義があります。

604  {
605  if (radius == 0) {
606  rect(x, y, width, height);
607  }
608  if (useFill) {
609  fillRoundRect(x, y, width, height, radius, fillColor);
610  }
611  if (useStroke) {
612  drawRoundRect(x, y, width, height, radius, strokeColor);
613  }
614 }
int16_t width(void)
void drawRoundRect(int16_t x0, int16_t y0, int16_t w, int16_t h, int16_t radius, uint16_t color)
void rect(int16_t x, int16_t y, int16_t width, int16_t height)
void fillRoundRect(int16_t x0, int16_t y0, int16_t w, int16_t h, int16_t radius, uint16_t color)
color strokeColor
Definition: Adafruit_GFX.h:184
int16_t height(void)

◆ rect() [3/4]

void Adafruit_GFX::rect ( int16_t  x,
int16_t  y,
int16_t  width,
int16_t  height 
)

◆ rect() [4/4]

void Adafruit_GFX::rect ( int16_t  x,
int16_t  y,
int16_t  width,
int16_t  height,
int16_t  radius 
)

◆ setCursor() [1/2]

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

Adafruit_GFX.cpp424 行目に定義があります。

424  {
425  cursor_x = x;
426  cursor_y = y;
427 }
int16_t cursor_y
Definition: Adafruit_GFX.h:170
int16_t cursor_x
Definition: Adafruit_GFX.h:170

◆ setCursor() [2/2]

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

◆ setRotation() [1/2]

void Adafruit_GFX::setRotation ( uint8_t  r)

Adafruit_GFX.cpp452 行目に定義があります。

452  {
453  rotation = (x & 3);
454  switch(rotation) {
455  case 0:
456  case 2:
457  _width = WIDTH;
458  _height = HEIGHT;
459  break;
460  case 1:
461  case 3:
462  _width = HEIGHT;
463  _height = WIDTH;
464  break;
465  }
466 }
const int16_t WIDTH
Definition: Adafruit_GFX.h:168
int16_t _height
Definition: Adafruit_GFX.h:170
int16_t _width
Definition: Adafruit_GFX.h:170
uint8_t rotation
Definition: Adafruit_GFX.h:175
const int16_t HEIGHT
Definition: Adafruit_GFX.h:168

◆ setRotation() [2/2]

void Adafruit_GFX::setRotation ( uint8_t  r)

◆ setTextColor() [1/4]

void Adafruit_GFX::setTextColor ( uint16_t  c)

Adafruit_GFX.cpp433 行目に定義があります。

433  {
434  // For 'transparent' background, we'll set the bg
435  // to the same as fg instead of using a flag
436  textcolor = textbgcolor = c;
437 }
uint16_t textbgcolor
Definition: Adafruit_GFX.h:173
uint16_t textcolor
Definition: Adafruit_GFX.h:173

◆ setTextColor() [2/4]

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

Adafruit_GFX.cpp439 行目に定義があります。

439  {
440  textcolor = c;
441  textbgcolor = b;
442 }
uint16_t textbgcolor
Definition: Adafruit_GFX.h:173
uint16_t textcolor
Definition: Adafruit_GFX.h:173

◆ setTextColor() [3/4]

void Adafruit_GFX::setTextColor ( uint16_t  c)

◆ setTextColor() [4/4]

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

◆ setTextSize() [1/2]

void Adafruit_GFX::setTextSize ( uint8_t  s)

Adafruit_GFX.cpp429 行目に定義があります。

429  {
430  textsize = (s > 0) ? s : 1;
431 }
uint8_t textsize
Definition: Adafruit_GFX.h:175

◆ setTextSize() [2/2]

void Adafruit_GFX::setTextSize ( uint8_t  s)

◆ setTextWrap() [1/2]

void Adafruit_GFX::setTextWrap ( boolean  w)

Adafruit_GFX.cpp444 行目に定義があります。

444  {
445  wrap = w;
446 }
boolean wrap
Definition: Adafruit_GFX.h:178

◆ setTextWrap() [2/2]

void Adafruit_GFX::setTextWrap ( boolean  w)

◆ stroke() [1/4]

void Adafruit_GFX::stroke ( uint8_t  red,
uint8_t  green,
uint8_t  blue 
)

Adafruit_GFX.cpp493 行目に定義があります。

493  {
494  stroke(newColor(red, green, blue));
495 }
void stroke(uint8_t red, uint8_t green, uint8_t blue)
virtual uint16_t newColor(uint8_t red, uint8_t green, uint8_t blue)

◆ stroke() [2/4]

void Adafruit_GFX::stroke ( color  c)

Adafruit_GFX.cpp497 行目に定義があります。

497  {
498  useStroke = true;
499  strokeColor = c;
500  setTextColor(c);
501 }
void setTextColor(uint16_t c)
color strokeColor
Definition: Adafruit_GFX.h:184

◆ stroke() [3/4]

void Adafruit_GFX::stroke ( uint8_t  red,
uint8_t  green,
uint8_t  blue 
)

◆ stroke() [4/4]

void Adafruit_GFX::stroke ( color  c)

◆ text() [1/5]

void Adafruit_GFX::text ( const char *  text,
int16_t  x,
int16_t  y 
)

Adafruit_GFX.cpp548 行目に定義があります。

548  {
549  if (!useStroke)
550  return;
551 
552  setTextWrap(false);
554  setCursor(x, y);
555  print(text);
556 }
void text(const char *text, int16_t x, int16_t y)
void setTextWrap(boolean w)
void setTextColor(uint16_t c)
size_t print(const __FlashStringHelper *)
Definition: Print.cpp:44
void setCursor(int16_t x, int16_t y)
color strokeColor
Definition: Adafruit_GFX.h:184

◆ text() [2/5]

void Adafruit_GFX::text ( int  value,
uint8_t  posX,
uint8_t  posY 
)

Adafruit_GFX.cpp520 行目に定義があります。

520  {
521  if (!useStroke)
522  return;
523 
524  setTextWrap(false);
526  setCursor(x, y);
527  print(value);
528 }
void setTextWrap(boolean w)
void setTextColor(uint16_t c)
size_t print(const __FlashStringHelper *)
Definition: Print.cpp:44
void setCursor(int16_t x, int16_t y)
color strokeColor
Definition: Adafruit_GFX.h:184

◆ text() [3/5]

void Adafruit_GFX::text ( long  value,
uint8_t  posX,
uint8_t  posY 
)

Adafruit_GFX.cpp529 行目に定義があります。

529  {
530  if (!useStroke)
531  return;
532 
533  setTextWrap(false);
535  setCursor(x, y);
536  print(value);
537 }
void setTextWrap(boolean w)
void setTextColor(uint16_t c)
size_t print(const __FlashStringHelper *)
Definition: Print.cpp:44
void setCursor(int16_t x, int16_t y)
color strokeColor
Definition: Adafruit_GFX.h:184

◆ text() [4/5]

void Adafruit_GFX::text ( char  value,
uint8_t  posX,
uint8_t  posY 
)

Adafruit_GFX.cpp538 行目に定義があります。

538  {
539  if (!useStroke)
540  return;
541 
542  setTextWrap(false);
544  setCursor(x, y);
545  print(value);
546 }
void setTextWrap(boolean w)
void setTextColor(uint16_t c)
size_t print(const __FlashStringHelper *)
Definition: Print.cpp:44
void setCursor(int16_t x, int16_t y)
color strokeColor
Definition: Adafruit_GFX.h:184

◆ text() [5/5]

void Adafruit_GFX::text ( const char *  text,
int16_t  x,
int16_t  y 
)

◆ textSize() [1/2]

void Adafruit_GFX::textSize ( uint8_t  size)

Adafruit_GFX.cpp569 行目に定義があります。

569  {
570  setTextSize(size);
571 }
void setTextSize(uint8_t s)

◆ textSize() [2/2]

void Adafruit_GFX::textSize ( uint8_t  size)

◆ textWrap() [1/2]

void Adafruit_GFX::textWrap ( const char *  text,
int16_t  x,
int16_t  y 
)

Adafruit_GFX.cpp558 行目に定義があります。

558  {
559  if (!useStroke)
560  return;
561 
562  setTextWrap(true);
564  setCursor(x, y);
565  print(text);
566 }
void text(const char *text, int16_t x, int16_t y)
void setTextWrap(boolean w)
void setTextColor(uint16_t c)
size_t print(const __FlashStringHelper *)
Definition: Print.cpp:44
void setCursor(int16_t x, int16_t y)
color strokeColor
Definition: Adafruit_GFX.h:184

◆ textWrap() [2/2]

void Adafruit_GFX::textWrap ( const char *  text,
int16_t  x,
int16_t  y 
)

◆ triangle() [1/2]

void Adafruit_GFX::triangle ( int16_t  x1,
int16_t  y1,
int16_t  x2,
int16_t  y2,
int16_t  x3,
int16_t  y3 
)

Adafruit_GFX.cpp628 行目に定義があります。

628  {
629  if (useFill) {
630  fillTriangle(x1, y1, x2, y2, x3, y3, fillColor);
631  }
632  if (useStroke) {
633  drawTriangle(x1, y1, x2, y2, x3, y3, strokeColor);
634  }
635 }
void drawTriangle(int16_t x0, int16_t y0, int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint16_t color)
color strokeColor
Definition: Adafruit_GFX.h:184
void fillTriangle(int16_t x0, int16_t y0, int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint16_t color)

◆ triangle() [2/2]

void Adafruit_GFX::triangle ( int16_t  x1,
int16_t  y1,
int16_t  x2,
int16_t  y2,
int16_t  x3,
int16_t  y3 
)

◆ width() [1/2]

int16_t Adafruit_GFX::width ( void  )

Adafruit_GFX.cpp469 行目に定義があります。

469  {
470  return _width;
471 }
int16_t _width
Definition: Adafruit_GFX.h:170

◆ width() [2/2]

int16_t Adafruit_GFX::width ( void  )

◆ write() [1/2]

void Adafruit_GFX::write ( uint8_t  c)
virtual

Printを実装しています。

Adafruit_GFX.cpp369 行目に定義があります。

369  {
370 #endif
371  if (c == '\n') {
372  cursor_y += textsize*8;
373  cursor_x = 0;
374  } else if (c == '\r') {
375  // skip em
376  } else {
378  cursor_x += textsize*6;
379  if (wrap && (cursor_x > (_width - textsize*6))) {
380  cursor_y += textsize*8;
381  cursor_x = 0;
382  }
383  }
384 #if ARDUINO >= 100
385  return 1;
386 #endif
387 }
boolean wrap
Definition: Adafruit_GFX.h:178
void drawChar(int16_t x, int16_t y, unsigned char c, uint16_t color, uint16_t bg, uint8_t size)
int16_t cursor_y
Definition: Adafruit_GFX.h:170
uint8_t textsize
Definition: Adafruit_GFX.h:175
uint16_t textbgcolor
Definition: Adafruit_GFX.h:173
int16_t cursor_x
Definition: Adafruit_GFX.h:170
int16_t _width
Definition: Adafruit_GFX.h:170
uint16_t textcolor
Definition: Adafruit_GFX.h:173

◆ write() [2/2]

virtual void Adafruit_GFX::write ( uint8_t  )
virtual

Printを実装しています。

メンバ詳解

◆ _height

int16_t Adafruit_GFX::_height
protected

Adafruit_GFX.h170 行目に定義があります。

◆ _width

int16_t Adafruit_GFX::_width
protected

Adafruit_GFX.h170 行目に定義があります。

◆ cursor_x

int16_t Adafruit_GFX::cursor_x
protected

Adafruit_GFX.h170 行目に定義があります。

◆ cursor_y

int16_t Adafruit_GFX::cursor_y
protected

Adafruit_GFX.h170 行目に定義があります。

◆ fillColor

color Adafruit_GFX::fillColor
protected

Adafruit_GFX.h186 行目に定義があります。

◆ HEIGHT [1/2]

const int16_t Adafruit_GFX::HEIGHT
protected

Adafruit_GFX.h168 行目に定義があります。

◆ HEIGHT [2/2]

int16_t Adafruit_GFX::HEIGHT
protected

Adafruit_GFX.h205 行目に定義があります。

◆ rotation

uint8_t Adafruit_GFX::rotation
protected

Adafruit_GFX.h175 行目に定義があります。

◆ strokeColor

color Adafruit_GFX::strokeColor
protected

Adafruit_GFX.h184 行目に定義があります。

◆ textbgcolor

uint16_t Adafruit_GFX::textbgcolor
protected

Adafruit_GFX.h173 行目に定義があります。

◆ textcolor

uint16_t Adafruit_GFX::textcolor
protected

Adafruit_GFX.h173 行目に定義があります。

◆ textsize

uint8_t Adafruit_GFX::textsize
protected

Adafruit_GFX.h175 行目に定義があります。

◆ useFill

bool Adafruit_GFX::useFill
protected

Adafruit_GFX.h187 行目に定義があります。

◆ useStroke

bool Adafruit_GFX::useStroke
protected

Adafruit_GFX.h185 行目に定義があります。

◆ WIDTH [1/2]

const int16_t Adafruit_GFX::WIDTH
protected

Adafruit_GFX.h168 行目に定義があります。

◆ WIDTH [2/2]

int16_t Adafruit_GFX::WIDTH
protected

Adafruit_GFX.h205 行目に定義があります。

◆ wrap

boolean Adafruit_GFX::wrap
protected

Adafruit_GFX.h178 行目に定義があります。


このクラス詳解は次のファイルから抽出されました: