Javascript SVG renderer October 26
So, I’ve been playing a lot with how to draw arbitrary shapes in javascript for a project I’ve been working on. SVG and are both options, but poor options, as neither has great browser support. SVG loks the most promising, as it’s xml, very featureful, and integrates well into the who xhtml paradigm.
The question is, how can you use it now, before the browsers get native SVG support. The adobe plugin is an option, but anything that requires users to download a plugin is relatively worthless in the general internet sphere.
However, why not write an SVG renderer in javascript? It seems like all the pieces are there. Javascript has a good xml parser, and it can output arbitrary raster graphics, via somewhat nasty html/css hacks. You can draw an arbitrary raster image by simply using many 1 pixel div tags.
To go a step further, Walter Zorn’s javascript vector graphics library already has basic vector graphics functions (polylines, ovals, lines, etc), using thse same div hacks. This could be extended or built on to get full svg functionality.