Home » HTML » HTML Graphics » Question
  1. Which of the following methods must empty the list of subpaths so that the context once again has zero subpaths?
    1. endPath()
    2. moveTo(x, y)
    3. closePath()
    4. beginPath()
    5. 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.



Your comments will be displayed only after manual approval.