Skip to content

Instantly share code, notes, and snippets.

@penguinbroker
Created January 16, 2012 21:17
Show Gist options
  • Save penguinbroker/1623094 to your computer and use it in GitHub Desktop.
Save penguinbroker/1623094 to your computer and use it in GitHub Desktop.
var lastDrawing;
function save() {
var paths = [];
var path = paper.project.activeLayer.firstChild;
while (path) {
// store
segments = [];
foreach ( segment in path.segments ) {
tempPath = {
x: segment.point.x,
y: segment.point.y,
ix: segment.handleIn.x,
iy: segment.handleIn.y,
ox: segment.handleOut.x,
oy: segment.handleOut.y
};
segments.push(tempPath);
}
paths.push(step);
path = path.nextSibling;
}
lastDrawing = paths;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment