1.4.1 HTML5 Canvas Path Tutorial

Posted on November 4th, 2010 by Eric Rowell

To create a path with HTML5 Canvas, we can connect multiple subpaths. The ending point of each new subpath becomes the new context point. We can use the lineTo(), arcTo(), quadraticCurveTo(), and bezierCurveTo() methods to construct each subpath which makes up our path. We can use the beginPath() method each time we want to start drawing a new path.

HTML5 Canvas Path Example

Open in new window

Code Editor

HTML5 Canvas Path Explanation

HTML5 Canvas Path

Leave a Comment