FabGL
ESP32 Display Controller and Graphics Library
|
void fillRectangle | ( | int | X1, |
int | Y1, | ||
int | X2, | ||
int | Y2 | ||
) |
Fills a rectangle using the current brush color.
X1 | Top left horizontal coordinate. |
Y1 | Top left vertical coordiante. |
X2 | Bottom right horizontal coordinate. |
Y2 | Bottom right vertical coordiante. |
Example:
// Paint a filled yellow rectangle Canvas.setBrushColor(Color::BrightYellow); Canvas.fillRectangle(10, 10, 100, 100); // Paint a yellow rectangle with blue border Canvas.setPenColor(Color::BrightBlue); Canvas.setBrushColor(Color::BrightYellow); Canvas.fillRectangle(10, 10, 100, 100); Canvas.drawRectangle(10, 10, 100, 100);
Definition at line 278 of file canvas.cpp.