summaryrefslogtreecommitdiffstats
path: root/src/matrix.js
diff options
context:
space:
mode:
authorwout <wout@impinc.co.uk>2014-08-24 16:15:56 +0200
committerwout <wout@impinc.co.uk>2014-08-24 16:15:56 +0200
commita5837d5bf9d980605358f3bfc63a65acd87c3444 (patch)
tree81f1af10505f36ad8618ddfb247ab820f4c18bd8 /src/matrix.js
parent35c46452577fc550793d13075c3010619ac1c96d (diff)
downloadsvg.js-a5837d5bf9d980605358f3bfc63a65acd87c3444.tar.gz
svg.js-a5837d5bf9d980605358f3bfc63a65acd87c3444.zip
Implemented absolute and relative matrix transformations
Diffstat (limited to 'src/matrix.js')
-rw-r--r--src/matrix.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/matrix.js b/src/matrix.js
index e9c8900..7ee2874 100644
--- a/src/matrix.js
+++ b/src/matrix.js
@@ -141,7 +141,11 @@ SVG.Matrix = SVG.invent({
}
// Convert matrix to string
, toString: function() {
- return 'matrix(' + [this.a, this.b, this.c, this.d, this.e, this.f].join() + ')'
+ return 'matrix(' + this.toArray().join() + ')'
+ }
+ // Convert matrix to array
+ , toArray: function() {
+ return [this.a, this.b, this.c, this.d, this.e, this.f]
}
}