More line helpers
This commit is contained in:
parent
58ec84eb6f
commit
501606d570
|
|
@ -242,6 +242,16 @@ void Adafruit_RA8875::drawLine(int16_t x0, int16_t y0, int16_t x1, int16_t y1, u
|
|||
}
|
||||
}
|
||||
|
||||
void Adafruit_RA8875::drawFastVLine(int16_t x, int16_t y, int16_t h, uint16_t color)
|
||||
{
|
||||
drawLine(x, y, x, y+h, color);
|
||||
}
|
||||
|
||||
void Adafruit_RA8875::drawFastHLine(int16_t x, int16_t y, int16_t w, uint16_t color)
|
||||
{
|
||||
drawLine(x, y, x+w, y, color);
|
||||
}
|
||||
|
||||
void Adafruit_RA8875::drawRect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color)
|
||||
{
|
||||
rectHelper(x, y, x+w, y+h, color, false);
|
||||
|
|
@ -257,6 +267,16 @@ void Adafruit_RA8875::fillScreen(uint16_t color)
|
|||
rectHelper(0, 0, _width-1, _height-1, color, true);
|
||||
}
|
||||
|
||||
void Adafruit_RA8875::drawCircle(int16_t x0, int16_t y0, int16_t r, uint16_t color)
|
||||
{
|
||||
circleHelper(x0, y0, r, color, false);
|
||||
}
|
||||
|
||||
void Adafruit_RA8875::fillCircle(int16_t x0, int16_t y0, int16_t r, uint16_t color)
|
||||
{
|
||||
circleHelper(x0, y0, r, color, true);
|
||||
}
|
||||
|
||||
void Adafruit_RA8875::circleHelper(int16_t x0, int16_t y0, int16_t r, uint16_t color, bool filled)
|
||||
{
|
||||
/* Set X */
|
||||
|
|
@ -359,16 +379,6 @@ void Adafruit_RA8875::rectHelper(int16_t x, int16_t y, int16_t w, int16_t h, uin
|
|||
}
|
||||
}
|
||||
|
||||
void Adafruit_RA8875::drawCircle(int16_t x0, int16_t y0, int16_t r, uint16_t color)
|
||||
{
|
||||
circleHelper(x0, y0, r, color, false);
|
||||
}
|
||||
|
||||
void Adafruit_RA8875::fillCircle(int16_t x0, int16_t y0, int16_t r, uint16_t color)
|
||||
{
|
||||
circleHelper(x0, y0, r, color, true);
|
||||
}
|
||||
|
||||
/************************* Mid Level ***********************************/
|
||||
|
||||
void Adafruit_RA8875::GPIOX(boolean on) {
|
||||
|
|
|
|||
|
|
@ -31,8 +31,8 @@ class Adafruit_RA8875 : public Adafruit_GFX {
|
|||
/* Adafruit_GFX functions */
|
||||
void drawPixel(int16_t x, int16_t y, uint16_t color);
|
||||
void drawLine(int16_t x0, int16_t y0, int16_t x1, int16_t y1, uint16_t color);
|
||||
//void drawFastVLine(int16_t x, int16_t y, int16_t h, uint16_t color);
|
||||
//void drawFastHLine(int16_t x, int16_t y, int16_t w, uint16_t color);
|
||||
void drawFastVLine(int16_t x, int16_t y, int16_t h, uint16_t color);
|
||||
void drawFastHLine(int16_t x, int16_t y, int16_t w, uint16_t color);
|
||||
void drawRect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color);
|
||||
void fillRect(int16_t x, int16_t y, int16_t w, int16_t h, uint16_t color);
|
||||
void fillScreen(uint16_t color);
|
||||
|
|
|
|||
Loading…
Reference in New Issue