Home > Web Front-end > HTML Tutorial > How to use svg object in Html5 canvas. _html/css_WEB-ITnose

How to use svg object in Html5 canvas. _html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:15:32
Original
1336 people have browsed it

Use drawImage in canvas and pass in the svg object as a parameter, but it cannot be displayed. I don’t know if drawImage does not support this type of object parameter. Solve. . .


Reply to discussion (solution)

See method
http://code.google.com/p/canvg/
http://canvg.googlecode .com/svn/trunk/examples/index.htm

I’ll post a piece of code for you:

Copy after login



test