Created
October 21, 2010 22:58
-
-
Save davidguttman/639541 to your computer and use it in GitHub Desktop.
raphael path svg string
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
points_to_svg_string: function(points) { | |
if (!points[0]) { | |
return ""; | |
} | |
var svg_string = "M" + points[0][0] + " " + points[0][1]; | |
for (var i = 1; i < points.length; i++) { | |
var x = points[i][0], | |
y = points[i][1]; | |
svg_string = svg_string + "L" + x + " " + y; | |
} | |
return svg_string; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment