HTML5 Canvas Custom Shape Tutorial

To create a custom shape with HTML5 Canvas, we can create a path and then close it using the closePath() method.  We can use the lineTo(), arcTo(), quadraticCurveTo(), or bezierCurveTo() methods to construct each subpath which makes up our shape.

Open in new window

Code Editor

Modified on April 8th, 2013 by Eric Rowell
comments powered by Disqus