O'Reilly logo

Pro HTML5 Programming: Powerful APIs for Richer Internet Application Development by Frank Salim, Brian Albers, Peter Lubbers

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 2. Using the HTML5 Canvas API

In this chapter, we'll explore what you can do with the HTML5 Canvas API—a cool API that enables you to dynamically generate and render graphics, charts, images, and animation. We'll walk you through using the basics of the rendering API to create a drawing that can scale and adjust to the browser environment. We'll show you how to create dynamic pictures based on user input in a heatmap display. Of course, we'll also alert you to the pitfalls of using HTML5 Canvas and share tricks to overcome them.

This chapter presumes only a minimal amount of graphics expertise, so don't be afraid to jump in and try out one of the most powerful features of HTML.

Overview of HTML5 Canvas

An entire book could be written about ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required