/

HTML / CSS / JavaScript Tutorial

JavaScript canvas2d object method: closePath()

[this page | pdf | back links]

The closePath() method of the JavaScript DOM object returned by the getContext("2d") method applied to the HTML <canvas> element completes a path back to its original starting point.

 

It has the following syntax with no parameters.

 

context.closePath()

 


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


Desktop view | Switch to Mobile