One of HTML5 s most exciting features Canvas provides a powerful 2D graphics API that lets you implement everything from word processors to video games. In Core HTML5 Canvas best-selling author David Geary presents a code-fueled no-nonsense deep dive into that API covering everything you need to know to implement rich & consistent web applications that run on a wide variety of operating systems & devices. Succinctly & clearly written this book examines dozens of real-world uses of the Canvas API such as interactively drawing & manipulating shapes saving & restoring the drawing surface to temporarily draw shapes & text & implementing text controls. You ll see how to keep your applications responsive with web workers when you filter images how to implement smooth animations & how to create layered 3D scrolling backgrounds with parallax. In addition you ll see how to implement video games with extensive coverage of sprites physics collision detection & the implementation of a game engine & an industrial-strength pinball game. The book concludes by showing you how to implement Canvas-based controls that you can use in any HTML5 application & how to use Canvas on mobile devices including i OS5. This authoritative Canvas reference covers * The canvas element-using it with other HTML elements handling events printing a canvas & using offscreen canvases* Shapes-drawing dragging erasing & editing lines arcs circles curves & polygons; using shadows gradients & patterns* Text-drawing positioning setting font properties; building text controls* Images-drawing scaling clipping processing & animating* Animations-creating smooth efficient & portable animations* Sprites-implementing animated objects that have painters & behaviors* Physics-modeling physical systems (falling bodies pendulums & projectiles) & implementing tweening for nonlinear motion & animation* Collision detection-advanced techniques clearly explained* Game development-all aspects of game development such as time-based motion & high score support implemented in a game engine* Custom controls-infrastructure for implementing custom controls; implementing progress bars sliders & an image panner* Mobile applications-fitting Canvas apps on a mobile screen using media queries handling touch events & specifying i OS5 artifacts such as app icons Throughout the book Geary discusses high-quality reusable code to help professional developers learn everything they really need to know with no unnecessary verbiage. All of the book s code & live demonstrations of key techniques are available at corehtml 5canvas.com.