Abstract
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 programming effort and potentially different performance.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
Rights and permissions
Copyright information
© 2010 Silvia Pfeiffer
About this chapter
Cite this chapter
Pfeiffer, S. (2010). HTML5 Media and Canvas. In: The Definitive Guide to HTML5 Video. Apress. https://doi.org/10.1007/978-1-4302-3091-5_6
Download citation
DOI: https://doi.org/10.1007/978-1-4302-3091-5_6
Publisher Name: Apress
Print ISBN: 978-1-4302-3090-8
Online ISBN: 978-1-4302-3091-5
eBook Packages: Professional and Applied ComputingProfessional and Applied Computing (R0)Apress Access Books