Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to convert SVG files to HTML5's canvas?

Tags:

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

like image 412
Gabriel Avatar asked May 25 '10 18:05

Gabriel


People also ask

Can you put SVG on canvas?

To draw SVG onto canvas, you need to use SVG image. Firstly, use the <foreignObject> element which contains the HTML. After that, you need to draw the SVG image into the canvas.

What is the difference between the SVG and canvas Elernerts?

The<canvas> element is a container for graphics. SVG gives better performance with smaller number of objects or larger surface. Canvas gives better performance with smaller surface or larger number of objects. SVG is vector based and composed of shapes.


1 Answers

canvg seems to be a better solution. It is an active project as of January 2012.

canvas-svg hasn't been updated since it was published in June 2009.

like image 58
schellmax Avatar answered Sep 25 '22 19:09

schellmax