|
FabGL2 2.0.0
ESP32 Display Controller and Graphics Library for ESP-IDF
|
| void drawLine | ( | int | X1, |
| int | Y1, | ||
| int | X2, | ||
| int | Y2 ) |
Draws a line between the specified start and end coordinates.
The line is drawn with 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.