FabGL
ESP32 VGA Controller and Graphics Library
|
void fabgl::CanvasClass::drawPath | ( | Point const * | points, |
int | pointsCount | ||
) |
Draw a sequence of lines.
Because the path is drawn on VSync (vertical retracing) the provided array of points must survive until the path is completely painted. To avoid it, application can disable drawing on vsync (calling VGAControllerClass.enableBackgroundPrimitiveExecution()) or just wait until all the drawing have been completed(calling CanvasClass.waitCompletion()).
points | A pointer to an array of Point objects. |
pointsCount | Number of points in the array. |
Example:
Point points[3] = { {10, 10}, {20, 10}, {15, 20} }; Canvas.setPenColor(Color::Red); Canvas.drawPath(&points, 3); Canvas.waitCompletion();