Chapter 6

Drawing on the Canvas

In This Chapter

arrow Adding a canvas to your HTML page

arrow Drawing paths and geometric shapes

arrow Working with images

arrow Pixel manipulation

The canvas element is one of the most interesting new developments in HTML5. Although the <canvas> tag is an HTML tag, it really isn't interesting without JavaScript programming. The <canvas> tag provides a graphics context, which is an area of the page that can be drawn upon with JavaScript commands.

The <canvas> tag supplies a rich toolkit of drawing operations that may very well revolutionize the web. Innovations in the <canvas> tag along with advances in the speed of JavaScript engines may very well lead to new uses of the web. A number of developers have developed games with the <canvas> tag and JavaScript that would have required Flash or Java just a few years ago. Also, the flexibility of <canvas> could lead to entirely new visual tools and widgets that are not based on HTML, which could have profound implications on usability and user interfaces.

The <canvas> tag is supported by all current browsers.

Although many of ...

Get HTML5 and CSS3 All-in-One For Dummies, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.