From 5e9ab52bd68670208ac25cfcf95cca178d285545 Mon Sep 17 00:00:00 2001 From: wout Date: Mon, 28 Jul 2014 22:16:35 +0200 Subject: Added more control to SVG.Matrix --- README.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'README.md') diff --git a/README.md b/README.md index f4892bd..2799b34 100755 --- a/README.md +++ b/README.md @@ -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: -- cgit v1.2.3