function drawSvgOnCanvas(img) {
				var width = img.width || 30;
				var height = img.height || 30;
				var canvas = document.createElement("canvas");
				var context = canvas.getContext("2d");

				this.set({ width: width, height: height });

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

				context.drawImage(img, 0, 0);

				return canvas;
			}
/**
    * draw the SVG on a canvas
    * @param  {Image} img The SVG
    * @return {Canvas}     The canvas with the SVG drawn on it
    */
draw the SVG on a canvas
@param  {Image} img The SVG
@return {Canvas}     The canvas with the SVG drawn on it
draw the SVG on a canvas @param { Image } img The SVG @return { Canvas } The canvas with the SVG drawn on it
function drawSvgOnCanvas(img) {
				var width = img.width || 30;
				var height = img.height || 30;
				var canvas = document.createElement("canvas");
				var context = canvas.getContext("2d");
				this.set({ width: width, height: height });
				canvas.width = width;
				canvas.height = height;
				context.drawImage(img, 0, 0);
				return canvas;
			}
function drawSvgOnCanvas ( img ) { var width = img . width || 30 ; var height = img . height || 30 ; var canvas = document . createElement ( "canvas" ) ; var context = canvas . getContext ( "2d" ) ; this . set ( { width : width , height : height } ) ; canvas . width = width ; canvas . height = height ; context . drawImage ( img , 0 , 0 ) ; return canvas ; }
draw the SVG on a canvas
 @param  {Image} img The SVG
 @return {Canvas}     The canvas with the SVG drawn on it
draw the SVG on a canvas @param { Image } img The SVG @return { Canvas } The canvas with the SVG drawn on it