SVG to Canvas

From Devipedia

Revision as of 10:11, 11 September 2011 by WikiSysop (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

As I mentioned previously, canvas is a low-level vector graphics API, and therefore it's time consuming to build up complex objects. Higher level javascript libraries like cake.js can help to make you productive more quickly. But here I want to stick with directly manipulating graphics at the Canvas level.

So far there are not a lot of vector graphics tools that directly export Canvas javascript code. But there is a way to get it done using an editor, like Inkscape, and a helper library, like SvgToCanvas.

The steps:

java -jar svg2canvas.jar drawing.svg > canvas.html

Personal tools