views:

587

answers:

6

I believe that at one point, I saw a TinySVG implementation that worked in the browser, using the canvas element as the backend. I found a few sites that appeared to indicate it was at http://fuchsia-design.com/CanvaSVG/, however, that site appears to no longer exist. Is this project (or a similar one) still on the web anywhere?

+2  A: 

In an environment where you are able to use the canvas element (firefox etc), you already have built in support for rendering SVG using the img tag.

If you are looking for something a little more cross-browser; I would take a good look at dojo or more specifically dojox.gfx, which allows SVG rendering using canvas, VML (for IE) or silverlight. It allows you to do all kinds of other very clever things with transformation matrices and draw functions.

hookd
IE can support canvas via plugins and js wrappers (excanvas at google is coming along nicely). It looks like dojo.gfx is more for svg as one potential output path rather than a parser. It does look like a nice API, though.
jsight
+2  A: 

After a good look around on Google, it looks like CanvaSVG was never much more than a project hacked together in a couple of days by Antoine Quint, who now seems to work for Apple.

I did see his site was cached by Google on 2 July, at least, so it hasn't been offline for too long yet, though there's no trace of CanvaSVG in the Google cache, only an outdated blog.

Archive.org does have a snapshot of that page, though, which includes a download link for the code.

I also found a project using CanvaSVG on Google Code.

Both of those downloads are version 0.1.

I did come across a few other, similar projects, but none that actually converted SVG to <canvas>. SVGCanvas goes the other way around, for example.

mercator
+1  A: 

The CakeJS project provides an SVG parser (http://code.google.com/p/cakejs/).

The SVG Parser and its docs

Fabien Ménager
That is a cool project, but I don't see an svg parser. It might still be useful for the project, though.
jsight
Sorry, I haven't been very precise. I add a link to the SCVParser test page.
Fabien Ménager
Wow, that is cool! Thx!
jsight
A: 

Just for reference, there is http://code.google.com/p/canvg/ which does exactly SVG to Canvas.

stefanw
A: 

flanvas.com is almost in beta

Jackson