Canvas Tutorials

Canvas Methods and Properties

HTML canvas closePath() Method

HTML canvas closePath() Method



The closePath() method creates a path from the current point back to the starting point. 
We have to use the stroke() method to actually draw this path on canvas.
We can use the fill() method to change color.


Default Value:-


Its default value is black.




Its syntax is:- context.closePath();

Code Explanation

All Tutorials related to Canvas Methods and Properties

All Sections related to Canvas