25.02.2013 Views

Peter Lubbers - Pro HTML 5 Programming

Pro HTML 5 Programming

Pro HTML 5 Programming

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Figure 2-10. Quadratic curve start, end, and control points<br />

CHAPTER 2 ■ USING THE <strong>HTML</strong>5 CANVAS API<br />

Other options for curves in the <strong>HTML</strong>5 Canvas API include the bezierCurveTo, arcTo, and arc<br />

functions. These curves take additional control points, a radius, or angles to determine the<br />

characteristics of the curve. Figure 2-11 shows the two quadratic curves stroked on our canvas to create a<br />

path through the trees.<br />

Figure 2-11. Quadratic curves for a path<br />

43

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!