How to convert SVG files to HTML5's canvas?

2020-02-08 04:35发布

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

标签: html svg canvas
9条回答
兄弟一词,经得起流年.
2楼-- · 2020-02-08 05:04

If you want manipulate objects after conversion I recommend http://www.kineticjs.com/ it supports also SVG path data format. For instance: http://www.html5canvastutorials.com/kineticjs/html5-canvas-kineticjs-path-tutorial/.

It's pretty easy to loop through svg and change rectangles, paths, lines etc.. to coresponding kineticJS (canvas) objects.

查看更多
一夜七次
4楼-- · 2020-02-08 05:10

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.

查看更多
登录 后发表回答