Download Svg2Canvas v1.0.0 SVG2Canvas converter

SVG2Canvas is a script I wrote to convert SVG images into javascript driven HTML canvas elements. It was written for 2 reasons:

  • 1. To familiarize myself with html5 canvas and javascript drawing
  • 2. To see how compatible Canvas and SVG are (Very, but not completely)

I don't know how much use it will be to anyone, but I'm offering it up here for whatever reason.
There are a few things you should know about it first:

  • It doesn't support some of SVG's more complex features
  • It doesn't support animation or interactivity of any kind.
  • It has problems with inherited color in some paths, or rather there seems to be some magic going on in SVG images with regards to inherited fill colors, and I haven't figured that out fully
  • If you run into this, just make sure all your entities specify their fill colors
  • This works for many of my test SVG images, but I can't guarantee it will work with yours.
  • If you make improvements to it, by all means send me a copy and I'll update the download with the new features

This is an SVG image I created of Darth Vader:

This is an SVG image I created of a Stormtrooper:

This is an SVG image I created of Boba Fett:

This is an SVG image I created of an undead panda: