Chapter 6. HTML5 Media and Canvas
While the SVG environment is a declarative graphics environment dealing with vector-based shapes, the HTML Canvas provides a script-based graphics environment revolving around pixels or bitmaps. In comparison with SVG, it is faster to manipulate data entities in Canvas, since it is easier to get directly to individual pixels. On the other hand, SVG provides a DOM and has an event model not available to Canvas. Thus, applications that need graphics with interactivity will typically choose SVG, while applications that do a lot of image manipulation will more typically reach for Canvas. The available transforms and effects in both are similar, and the same visual results can be achieved with both, but with different ...
Get The Definitive Guide to HTML5 Video now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.