function string_to_svg_path(str) {
			var path = [];
			var tokens = str.split("L");
			
			if (tokens.length > 0) {
				var token = tokens[0].replace("M", "");
				var points = token.split(",");
				path.push(["M", parseInt(points[0]), parseInt(points[1])]);
				
				for (var i = 1, n = tokens.length; i < n; i++) {
					token = tokens[i];
					points = token.split(",");
					path.push(["L", parseInt(points[0]), parseInt(points[1])]);
				}
			}
			
			return path;
		}
// Convert a string into an SVG path. This reverses the above code.
Convert a string into an SVG path. This reverses the above code.
Convert a string into an SVG path . This reverses the above code .
function string_to_svg_path(str) {
			var path = [];
			var tokens = str.split("L");
			if (tokens.length > 0) {
				var token = tokens[0].replace("M", "");
				var points = token.split(",");
				path.push(["M", parseInt(points[0]), parseInt(points[1])]);
				for (var i = 1, n = tokens.length; i < n; i++) {
					token = tokens[i];
					points = token.split(",");
					path.push(["L", parseInt(points[0]), parseInt(points[1])]);
				}
			}
			return path;
		}
function string_to_svg_path ( str ) { var path = [ ] ; var tokens = str . split ( "L" ) ; if ( tokens . length > 0 ) { var token = tokens [ 0 ] . replace ( "M" , "" ) ; var points = token . split ( "," ) ; path . push ( [ "M" , parseInt ( points [ 0 ] ) , parseInt ( points [ 1 ] ) ] ) ; for ( var i = 1 , n = tokens . length ; i < n ; i ++ ) { token = tokens [ i ] ; points = token . split ( "," ) ; path . push ( [ "L" , parseInt ( points [ 0 ] ) , parseInt ( points [ 1 ] ) ] ) ; } } return path ; }
Convert a string into an SVG path.
Convert a string into an SVG path .