Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
We covered paths briefly in the last chapter by learning how to draw straight lines, and arcs (to create circles). What's great about paths in canvas is that they get much more exciting than lines and simple circles; you can actually create all sorts of weird and wonderful shapes with them.
A solitary straight path is great; it draws a lovely line. What we failed to cover in Chapter 3 was how to draw more than one line at a time and have them combine to make a single shape. In fact, we already know all the code to do this, so I';m going to jump right in and show you how to connect multiple paths together.