Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot draw SVG on canvas using canvg #11

Closed
felixcriv opened this issue Mar 25, 2013 · 3 comments
Closed

Cannot draw SVG on canvas using canvg #11

felixcriv opened this issue Mar 25, 2013 · 3 comments
Labels

Comments

@felixcriv
Copy link

I was trying to make it work with canvg but it doesn't work, for some reason I cannot draw the SVG on a canvas (HTML5).

@bramp
Copy link
Owner

bramp commented Mar 25, 2013

felixcriv, can you give me a example of the code that isn't working for you?

@felixcriv
Copy link
Author

var data = document.getElementById('diagram').childNodes[0]; //svg data
var s = new XMLSerializer();
var str = s.serializeToString(data); //convert SVG code to string
canvg(document.getElementById('canvas'), str); //drawing the svg on the canvas

@bramp
Copy link
Owner

bramp commented May 19, 2013

I created a canvg.html test file in af152d7 and I am unable to reproduce your issue.

If you are still having the issue can you try my test file, and report what browser/os/etc you are on.

@bramp bramp closed this as completed May 19, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants