1.

Which of the following methods must empty the list of subpaths so that the context once again has zero subpaths?(a) closePath()(b) beginPath()(c) moveTo(x, y)(d) endPath()The question was asked in quiz.This interesting question is from Client-Side Graphics with Canvas in portion HTML Markup, Forms, Video, Audio & Other Multimedia of HTML

Answer»

Right choice is (b) beginPath()

For explanation I WOULD say: 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.



Discussion

No Comment Found

Related InterviewSolutions