![Html5 canvas draw circle Html5 canvas draw circle](http://chittagongit.com/images/half-circle-icon/half-circle-icon-6.jpg)
There are three methods that draw rectangles on the canvas − Sr.No.Method and Description1fillRect(x,y,width,height)This method draws a filled rectangle.2strokeRect(x,y,width,height)This method draws a rectangular outline.3clearRect(x,y,width,height)This method clears the specified area and makes it fully transparentHere x and y specify the position on the canvas (relative to the origin) of the top-left corner of the rectangle and width and height are width and height of the rectangle. ExampleFollowing is a simple example which makes use of above mentioned methods to draw a nice rectangle.
![Semi Circle Html Canvas Semi Circle Html Canvas](/uploads/1/2/4/2/124230715/801315450.png)
Definition and Usage. The fill method fills the current drawing (path). The default color is black. Tip: Use the fillStyle property to fill with another color/gradient. Note: If the path is not closed, the fill method will add a line from the last point to the startpoint of the path.