Skip to Main Content
HTML5 Programmer’s Reference
book

HTML5 Programmer’s Reference

by Jonathan Reid
July 2015
Intermediate to advanced content levelIntermediate to advanced
392 pages
8h 49m
English
Apress
Content preview from HTML5 Programmer’s Reference

CHAPTER 9

image

Canvas Reference

This chapter will provide a detailed reference for the canvas element and the 2D drawing context API. For detailed discussions about these features and more examples, see Chapter 4.

The canvas Element

The HTML5 canvas element enables you to draw bitmaps on web pages by providing a blank “canvas” to work on. The canvas element itself is a block-level DOM element. To use a canvas element for drawing, you have to fetch a drawing context reference from the element. The context exposes an extensive API for drawing that you can use in your scripts.

The API definition for the canvas element itself is:

Interface HTMLCanvasElement ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

HTML5 Tag Structure

HTML5 Tag Structure

Matthew David
HTML5 Cookbook

HTML5 Cookbook

Christopher Schmitt, Kyle Simpson

Publisher Resources

ISBN: 9781430263685Purchase book