-
Which of the following methods must empty the list of subpaths so that the context once again has zero subpaths?
-
- endPath()
- moveTo(x, y)
- closePath()
- beginPath()
- None of these
Correct Option: D
ClosePath() creates a path that starts from current point up to the starting point. The beginPath() method begins a path, or resets the current path. MoveTo(x, y) moves the point specified in canvas but without creating the line. There is nothing like endPath() in canvas.