Skip to content

Instantly share code, notes, and snippets.

@katdowns
Created September 18, 2012 22:17
Show Gist options
  • Save katdowns/3746297 to your computer and use it in GitHub Desktop.
Save katdowns/3746297 to your computer and use it in GitHub Desktop.
Resizing a raphael object
//for each path you draw
// var path should contain string with path coords
var c = paper.path(path);
//six params: 1 and 4 are scale, 5 is x, 6 is y,
//more details here: http://cancerbero.vacau.com/raphaeltut/#sec-types-transform
c.matrix.add(.4, 0, 0, .4, -200, -50);
//apply matrix
c.attr({transform: c.matrix.toTransformString()});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment