diff options
author | Saivan <savian@me.com> | 2018-05-17 17:51:36 +1000 |
---|---|---|
committer | Saivan <savian@me.com> | 2018-05-17 17:51:36 +1000 |
commit | 69b4111399015e1ad5ba28951bb264bafea21861 (patch) | |
tree | db7200f5565dd3f84a550a5422ac69ad9bf32e6d /src/point.js | |
parent | 82b3524c10b10094c7a6129639a34ca7c034dbdc (diff) | |
download | svg.js-69b4111399015e1ad5ba28951bb264bafea21861.tar.gz svg.js-69b4111399015e1ad5ba28951bb264bafea21861.zip |
Most of the animations are working
Diffstat (limited to 'src/point.js')
-rw-r--r-- | src/point.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/point.js b/src/point.js index 437f83c..9fd3c5a 100644 --- a/src/point.js +++ b/src/point.js @@ -54,8 +54,14 @@ SVG.Point = SVG.invent({ }, // transform point with matrix - transform: function (matrix) { - return new SVG.Point(this.native().matrixTransform(matrix.native())) + transform: function (m) { + + // Perform the matrix multiplication + var x = m.a * this.x + m.c * this.y + m.e + var y = m.b * this.x + m.d * this.y + m.f + + // Return the required point + return new SVG.Point(x, y) } } }) |