Chapter 4. Canvas

This chapter covers

  • Building graphics into web applications using HTML Canvas
  • Working with text, lines, shapes, and images on Canvas
  • Animating elements in Canvas

The Canvas API is new in HTML5, and it provides a means of drawing bitmap-based images inside the browser. Canvas has received a lot of media and developer attention because it is, in fact, a blank canvas upon which anyone can draw practically any visual element. In addition, because the canvas element is an HTML element like any other, it can be addressed in JavaScript as a regular element and participate in page flow and styling. Games are currently the most common use for Canvas, but any kind of image editing or drawing program could also be built using this ...

Get HTML5 for .NET Developers now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.