void screenkeys::fillRoundRect(uint8_t x, uint8_t y, uint8_t w,uint8_t h, uint16_t r, bool color) { // smarter version fillRect(x+r, y, w-2*r, h, color); // draw four corners fillCircleHelper(x+w-r-1, y+r, r, 1, h-2*r-1, color); fillCircleHelper(x+r , y+r, r, 2, h-2*r-1, color); }
// fill a rounded rectangle! void GOFi2cOLED::fillRoundRect(uint8_t x, uint8_t y, uint8_t w, uint8_t h, uint8_t r, uint8_t color) { // smarter version fillRect(x+r, y, w-2*r, h, color); // draw four corners fillCircleHelper(x+w-r-1, y+r, r, 1, h-2*r-1, color); fillCircleHelper(x+r , y+r, r, 2, h-2*r-1, color); }
// fill a rounded rectangle! void LCD_FillRoundRect(u16 x, u16 y, u16 w, u16 h, u16 r, u16 color) { // smarter version LCD_FillRect(x+r, y, w-2*r, h, color); // draw four corners fillCircleHelper(x+w-r-1, y+r, r, 1, h-2*r-1, color); fillCircleHelper(x+r , y+r, r, 2, h-2*r-1, color); }
// Fill a rounded rectangle void Adafruit_GFX_AS::fillRoundRect(int16_t x, int16_t y, int16_t w, int16_t h, int16_t r, uint16_t color) { // smarter version fillRect(x+r, y, w-2*r, h, color); // draw four corners fillCircleHelper(x+w-r-1, y+r, r, 1, h-2*r-1, color); fillCircleHelper(x+r , y+r, r, 2, h-2*r-1, color); }
// fill a rounded rectangle! void Adafruit_GFX::fillRoundRect(int16 x, int16 y, int16 w, int16 h, int16 r, uint32 color) { // smarter version fillRect(x+r, y, w-2*r, h, color); // draw four corners fillCircleHelper(x+w-r-1, y+r, r, 1, h-2*r-1, color); fillCircleHelper(x+r , y+r, r, 2, h-2*r-1, color); }
// Fill a rounded rectangle void graphics_api::fillRoundRect(MWCOORD x, MWCOORD y, MWCOORD w, MWCOORD h, MWCOORD r) { // fill interior rect fillRect(x+r, y, w-2*r, h); // draw four corners fillCircleHelper(x+w-r-1, y+r, r, 1, h-2*r-1); // right vertical side fillCircleHelper(x+r , y+r, r, 2, h-2*r-1); // left vertical side }
//============================================================================== // Fill a rounded rectangle //============================================================================== void ICACHE_FLASH_ATTR tft_fillRoundRect(unsigned int x, unsigned int y, unsigned int w, unsigned int h, unsigned int r, unsigned long color) { // smarter version tft_fillRect(x+r, y, w-2*r, h, color); // draw four corners fillCircleHelper(x+w-r-1, y+r, r, 1, h-2*r-1, color); fillCircleHelper(x+r , y+r, r, 2, h-2*r-1, color); }
void FramebufferGFX::fillRoundRect(int16_t x0, int16_t y0, int16_t x1, int16_t y1, int16_t r, uint16_t color) { // From Adafruit library (modified) int16_t w = x1 - x0; int16_t h = y1 - y0; int16_t x = x0; int16_t y = y0; if (x0 > x1) { x = x1; w = -w; } if (y0 > y1) { y = y1; h = -h; } // smarter version fillRect(x+r, y, x1-r, y1, color); // draw four corners fillCircleHelper(x+w-r-1, y+r, r, 1, h-2*r-1, color); fillCircleHelper(x+r , y+r, r, 2, h-2*r-1, color); }
void FramebufferGFX::fillCircle(int16_t x0, int16_t y0, int16_t r, uint16_t color) { // From Adafruit library drawFastVLine(x0, y0-r, 2*r+1, color); fillCircleHelper(x0, y0, r, 3, 0, color); }
void screenkeys::fillCircle(uint8_t x0, uint8_t y0, uint16_t r,bool color) { drawFastVLine(x0, y0-r, 2*r+1, color); fillCircleHelper(x0, y0, r, 3, 0, color); }
void Adafruit_GFX::fillCircle(int16 x0, int16 y0, int16 r, uint32 color) { drawFastVLine(x0, y0-r, 2*r+1, color); fillCircleHelper(x0, y0, r, 3, 0, color); }
void GOFi2cOLED::fillCircle(uint8_t x0, uint8_t y0, uint8_t r, uint8_t color) { drawFastVLine(x0, y0-r, 2*r+1, color); fillCircleHelper(x0, y0, r, 3, 0, color); }
void LCD_FillCircle(u16 x0, u16 y0, u16 r, u16 color) { LCD_DrawFastVLine(x0, y0-r, 2*r+1, color); fillCircleHelper(x0, y0, r, 3, 0, color); }
ICACHE_FLASH_ATTR void Adafruit_GFX_AS::fillCircle(int16_t x0, int16_t y0, int16_t r, uint16_t color) { drawFastVLine(x0, y0-r, 2*r+1, color); fillCircleHelper(x0, y0, r, 3, 0, color); }
// fill a circle void TFTLCD::fillCircle(uint16_t x0, uint16_t y0, uint16_t r, uint16_t color) { writeRegister(TFTLCD_ENTRY_MOD, 0x1030); drawVerticalLine(x0, y0-r, 2*r+1, color); fillCircleHelper(x0, y0, r, 3, 0, color); }
void Arduboy::fillCircle(int16_t x0, int16_t y0, int16_t r, uint8_t color) { drawFastVLine(x0, y0-r, 2*r+1, color); fillCircleHelper(x0, y0, r, 3, 0, color); }
// Yep, fill a circle void graphics_api::fillCircle(MWCOORD x0, MWCOORD y0, MWCOORD r) { drawVLine(x0, y0-r, 2*r+1); // center top vertical fillCircleHelper(x0, y0, r, 3, 0); // left and right vertical sides }