Created
September 18, 2012 22:17
-
-
Save katdowns/3746297 to your computer and use it in GitHub Desktop.
Resizing a raphael object
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
//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