/

HTML / CSS / JavaScript Tutorial

JavaScript canvas2d object method: beginPath()

[this page | pdf | back links]

The beginPath() method of the JavaScript DOM object returned by the getContext("2d") method applied to the HTML <canvas> element begins / resets a path. The stroke() method actually draws the path on the canvas.

 

It has the following syntax (with no parameters).

 

context.beginPath()

 


NAVIGATION LINKS
Contents | Prev | Next | JavaScript DOM (and BOM)


Desktop view | Switch to Mobile