src/simg.js
function(cb){
      this.toSvgImage(function(img){
        var canvas = document.createElement('canvas');
        var context = canvas.getContext("2d");

        canvas.width = img.width;
        canvas.height = img.height;

        context.drawImage(img, 0, 0);
        cb(canvas);
      });
    }
function(cb){
      this.toSvgImage(function(img){
        var canvas = document.createElement('canvas');
        var context = canvas.getContext("2d");

        canvas.width = img.width;
        canvas.height = img.height;

        context.drawImage(img, 0, 0);
        cb(canvas);
      });
    }
function ( cb ) { this . toSvgImage ( function ( img ) { var canvas = document . createElement ( 'canvas' ) ; var context = canvas . getContext ( "2d" ) ; canvas . width = img . width ; canvas . height = img . height ; context . drawImage ( img , 0 , 0 ) ; cb ( canvas ) ; } ) ; }
Return canvas with this SVG drawn inside.
Return canvas with this SVG drawn inside .