The Canvas element is a revolutionary feature of HTML5 that enables powerful graphics for rich Internet applications, and this pocket reference provides the essentials you need to put this element to work. If you have working knowledge of JavaScript, this book will help you create detailed, interactive, and animated graphics -- from charts to animations to video games -- whether you're a web designer or a programmer interested in graphics. Canvas Pocket Reference provides both a tutorial that covers all of the element's features with plenty of examples and a definitive reference to each of the Canvas-related classes, methods, and properties. You'll learn how to: Draw lines, polygons, and curves Apply colors, gradients, patterns, and transparency Use transformations to smoothly rotate and resize drawings Work with text in a graphic environment Apply shadows to create a sense of depth Incorporate bitmapped images into vector graphics Perform image processing operations in JavaScript
David Flanagan is a computer programmer who has spent much of the last 20 years writing books about programming languages. He now works at Mozilla. David lives with his wife and children in the Pacific Northwest, between the cities of Seattle and Vancouver.
When I got the Canvas Pocket Reference I was pretty excited. I've heard a lot about HTML5's canvas tag and was looking forward to getting my hands dirty messing with it. While going through this book, I found the author's insight to be valuable, but the samples and method descriptions a little hard to follow. I liked that the author didn't include boring examples, but I'm uneasy when a tutorial covers conceptually advanced topics (like recursion) early on that the some users may find hard to follow. I thought other examples (like Sparklines) were excellent.
This book is broken down into a tutorial chapter and reference chapter. The tutorial topics cover general topics, although it doesn't always cover implementation. The reference chapter however covers how to implement methods and properties of a canvas, but sometimes requires reading better represented in the tutorial. My general impression was that some of the tutorial comments (line-drawing attributes come to mind - I'm one that would confuse miter, bevel and round if I didn't use them frequently) would've been better off in the reference section.
Even though I had a little trouble navigating through the book and getting detailed information out of it quickly, it's a good size for a reference book. I still find that it had all the answers I needed, and addressed everything I would need to know. I did hope for some discussion of WebGL, but I know there's still a lot of active development going on.
Disclosure: I received a free review copy of this book through O'Reilly Media.