diff options
author | wout <wout@impinc.co.uk> | 2014-07-28 22:16:35 +0200 |
---|---|---|
committer | wout <wout@impinc.co.uk> | 2014-07-28 22:16:35 +0200 |
commit | 5e9ab52bd68670208ac25cfcf95cca178d285545 (patch) | |
tree | 0e83007452b8195886798889d2c7eeabb229d226 /README.md | |
parent | 0c336f2f4bc931c13779ed6ea3edf62f05f1f18f (diff) | |
download | svg.js-5e9ab52bd68670208ac25cfcf95cca178d285545.tar.gz svg.js-5e9ab52bd68670208ac25cfcf95cca178d285545.zip |
Added more control to SVG.Matrix
Diffstat (limited to 'README.md')
-rwxr-xr-x | README.md | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -3291,6 +3291,18 @@ or matrix.flip('y') ``` +By default elements are flipped over their center point. The flip axis position can be defined with the second argument: + +```javascript +matrix.flip('x', 150) +``` + +or + +```javascript +matrix.flip('y', 100) +``` + __`returns`: `SVG.Matrix`__ ### skew() @@ -3310,6 +3322,18 @@ matrix.skew(0, 45, 150, 100) __`returns`: `SVG.Matrix`__ +### around() +Performs a given matrix transformation around a given center point: + +```javascript +// cx, cy, matrix +matrix.around(100, 150, new SVG.Matrix().skew(0, 45)) +``` + +The matrix passed as the third argument will be used to multiply. + +__`returns`: `SVG.Matrix`__ + ### native() Returns a native `SVGMatrix` extracted from the `SVG.Matrix` instance: |