FabGL
ESP32 Display Controller and Graphics Library

◆ drawRectangle() [1/2]

void drawRectangle ( int  X1,
int  Y1,
int  X2,
int  Y2 
)

Draws a rectangle using the current pen color.

Parameters
X1Top left horizontal coordinate.
Y1Top left vertical coordiante.
X2Bottom right horizontal coordinate.
Y2Bottom right vertical coordiante.

Example:

// Paint a yellow rectangle
Canvas.setPenColor(Color::BrightYellow);
Canvas.drawRectangle(10, 10, 100, 100);

Definition at line 263 of file canvas.cpp.