Preface
This book documents the JavaScript API for drawing graphics in an HTML
<canvas> tag. It assumes that you know the
JavaScript programming language and have at least basic familiarity with the
use of JavaScript in web pages. Chapter 1 is a tutorial
that explains all Canvas features and demonstrates them with examples. Chapter 2 is a reference to each of the Canvas-related classes,
methods, and properties.
This book is an excerpt from the much longer book JavaScript: The Definitive
Guide; my publisher and I felt that the <canvas> tag is such an exciting
feature of HTML5 that it deserves a timely and concise book of its own.
Because the Canvas API is relatively small, this short book can document it
definitively.
Thanks to Raffaele Cecco for a careful review of the book and its code examples. Thanks also to my editor, Mike Loukides, for his enthusiasm for this project and to editor Simon St. Laurent for his work converting the material from “Definitive Guide” to “Pocket Reference” format.
The examples in this book can be downloaded from the book’s web page, which will also include errata if any errors are discovered after publication:
| http://oreilly.com/catalog/0636920016045/ |
In general, you may use the examples in this book in your programs and documentation. You do not need to contact us for permission unless you’re reproducing a significant portion of the code. We appreciate, but do not require, an attribution like this: “From Canvas Pocket Reference by David Flanagan (O’Reilly). ...
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.
Read now
Unlock full access