HTML5 graphics: Canvas vs. SVG

I've asked this question to Timothy Jordan from google, he told me canvas is for interactive graphics while SVG otherwise.

I've been searching which of the two to use in my mobile app (using phonegap) and why ?
The first thing I noticed is that most common mobile browsers does not support SVG at all (eg. android < 3.x )
The second thing I noticed that they support canvas very well.

SVG is an xml graphical format, so you might use usual DOM manipulations, on the other hand, Canvas is a set of methods you call to draw things (works like this: clear, draw, clear, draw ...etc).

In short if you want to create both web and mobile apps and cares for browser compatibility you might consider some api like dojo.gfx, if you just want a rich mobile app then you go with canvas.


Comments

Popular posts from this blog

How to defuse XZ Backdoor (or alike) in SSH Daemon

Making minimal graphical operating system

Bootstrapping Alpine Linux QCow2 image