![]() |
VOOZH | about |
The path.lineTo() function is used to draw a line to a given point from the current set of points.
Syntax:
path.lineTo(x, y);
Parameters: It takes two parameters as mentioned above and described below.
Return Value: It does not return any value.
Example 1: Making a line from (0, 0) to (100, 100).
Output:
👁 ImageExample 2: Making a square using lineTo() function.