Canvas

Canvas Tutorials

Canvas Methods and Properties

HTML canvas fill() Method

HTML canvas fill() Method

 

 

The fill() method is used to fill the current drawing path. Its default value is black. When used with the fillStyle property, it fills the color if the path is a closed path otherwise it will add a line from last to the start point of the path and make the close path, and then fill it.

 

Syntax:-

 

Its syntax is:- context.fill();

Code Explanation

All Tutorials related to Canvas Methods and Properties

All Sections related to Canvas