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, 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
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, height });
		canvas.width = width;
		canvas.height = height;
		context.drawImage(img, 0, 0);
		return canvas;
	}
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 , 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