FabGL
ESP32 Display Controller and Graphics Library
|
void drawLine | ( | int | X1, |
int | Y1, | ||
int | X2, | ||
int | Y2 | ||
) |
Draws a line specifying initial and ending coordinates.
The line has the current pen color.
X1 | Starting horizontal coordinate. |
Y1 | Starting vertical coordinate. |
X2 | Ending horizontal coordinate. |
Y2 | Ending vertical coordinate. |
Example:
// Paint a blue X over the whole canvas Canvas.setPenColor(Color::BrightBlue); Canvas.drawLine(0, 0, Canvas.getWidth() - 1, Canvas.getHeight() - 1); Canvas.drawLine(Canvas.getWidth() - 1, 0, 0, Canvas.getHeight() - 1);
Definition at line 256 of file canvas.cpp.