Saturday, June 24, 2006

SVG & Canvas: Graphics for the Web

Not surprisingly, SVG and the new Canvas element are presenting developers with a dilemma: which to use when they need to do graphics on a web page?

That question was addressed at XTech 2006 by one of the presenters, Vladimir Vukićević, of Mozilla corporation.

SVG & Canvas: Graphics for the Web:
Has scene DOM (SVG DOM, though)
Single HTML element, rendering script-driven
Deals in shapesDeals in pixels

Generally, the choice is pretty simple. If you want to paint bitmap image based graphics that exist as a rectangular array of pixels that are dynamically generated in an HTML or XHTML element on a web page - use Canvas.

If you want a scalable image consisting of vector (and possibly some bit-mapped image) graphics that are either scalable, predefined, or respond to user input events - then go with SVG.

Technorati tags: , , , , , , ,


Post a Comment

<< Home