HTML/Canvas and SVG

From W3C Wiki
< HTML
Revision as of 13:06, 19 November 2011 by Rworth (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

NOTE: THE MATERIAL ON THIS WIKI PAGE IS BEING MIGRATED ONTO THE WEB EDUCATION COMMUNITY GROUP'S DEDICATED WIKI PAGE, AT http://www.w3.org/community/webed/wiki/HTML/Canvas_and_SVG.

Canvas and SVG Elements

The <svg> element is intended the 2D vector rendering. The <canvas> element gives access to the 2D Context API.

Technical comparison

Technical considerations between SVG and the 2D Context API
SVG 2D Context API
document-based script-based
vectors pixel operations
object model with hi-testing and events low-level graphics API, no scene graph
performance hit with large numbers of shapes fast rendering
accessible must create accessible equivalent

Use case comparison

Use case considerations between SVG and the 2D Context API
SVG 2D Context API
user interfaces fast-paced games
scalable images very complex images
interactive animations highly dynamic visualizations
for designers for developers