SVG to Canvas

From Devipedia

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