Canvas

Canvas Tutorials

Canvas Methods and Properties

HTML canvas lineCap Property

HTML canvas lineCap Property

 

 

The lineCap property sets or returns the style of the end caps for a line.

 

Syntax:-

 

Its syntax is- context.lineCap="butt | round | square";

 

For your Information:-

 

The line will become slightly thinner when we use round or square.

 

Further Explanation:-

 

Value Description
butt Default. A flat edge is added to both end of the line
round A rounded end cap is added to both end of the line
square A square end cap is added to both end of the line

Code Explanation

All Tutorials related to Canvas Methods and Properties

All Sections related to Canvas