How To Set Line Thickness in HTML5 Canvas

On January 14, 2010, in Web Coding, by admin

Today I was searching around the web trying to figure out how to set the line thickness in HTML5 Canvas.

I stumbled across this great cheatsheet:

It had the information I needed, after setting the context you do something like this to make the lines thicker:


Then go ahead and do your stroke:


The line should now be more thick.

Be Sociable, Share!
Tagged with:  

One Response to How To Set Line Thickness in HTML5 Canvas

  1. tim says:

    Thanks Travis! Helpful chart.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>