if anyone has a link etc. where I can find more / better info on exporting an SVG as a image. It would be appreciated.
var svg = '<svg version="1.1" xmlns="http://www.w3.org/2000/svg" height="100" width="100"><circle cx="50" cy="50" r="40" stroke="black" stroke-width="3" fill="red" /></svg>';
i = new Image();
var cnv = document.createElement('canvas');
var ctx = cnv.getContext('2d');
i.onload = function() {
ctx.drawImage(i, 0, 0);
console.log(cnv.toDataURL());
}
i.src = 'data:image/svg+xml;base64,'+ btoa(svg);