How to convert SVG files to HTML5's canvas?


Is there a way to convert SVG files to HTML5's canvas compatible commands?


Answers:


There's no 100% solution, but there are script libraries that can convert a subset of svg to canvas, e.g http://code.google.com/p/canvas-svg/. There's also the experimental Path2D API that can draw an svg path data string onto the canvas, not sure how well it's supported across browsers though.