Skip to content

Instantly share code, notes, and snippets.

@davidguttman
Created October 21, 2010 22:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save davidguttman/639541 to your computer and use it in GitHub Desktop.
Save davidguttman/639541 to your computer and use it in GitHub Desktop.
raphael path svg string
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