summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorwout <wout@impinc.co.uk>2014-07-28 22:16:35 +0200
committerwout <wout@impinc.co.uk>2014-07-28 22:16:35 +0200
commit5e9ab52bd68670208ac25cfcf95cca178d285545 (patch)
tree0e83007452b8195886798889d2c7eeabb229d226 /README.md
parent0c336f2f4bc931c13779ed6ea3edf62f05f1f18f (diff)
downloadsvg.js-5e9ab52bd68670208ac25cfcf95cca178d285545.tar.gz
svg.js-5e9ab52bd68670208ac25cfcf95cca178d285545.zip
Added more control to SVG.Matrix
Diffstat (limited to 'README.md')
-rwxr-xr-xREADME.md24
1 files changed, 24 insertions, 0 deletions
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: