diff options
author | wout <wout@impinc.co.uk> | 2014-06-28 18:39:11 +0200 |
---|---|---|
committer | wout <wout@impinc.co.uk> | 2014-06-28 18:39:11 +0200 |
commit | 2260f5789b48dd92dccf0dd734cf59cf957e4d52 (patch) | |
tree | 2c94e66afe60e45f34db6ced5f24069ab4466c72 /src/pointarray.js | |
parent | 0d11ad263f193e8a585e7676deb8a60a8c103ef6 (diff) | |
download | svg.js-2260f5789b48dd92dccf0dd734cf59cf957e4d52.tar.gz svg.js-2260f5789b48dd92dccf0dd734cf59cf957e4d52.zip |
Added new SVG.Line class and working on SVG.Matrix
Diffstat (limited to 'src/pointarray.js')
-rwxr-xr-x | src/pointarray.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/pointarray.js b/src/pointarray.js index 67b6ad4..f43234c 100755 --- a/src/pointarray.js +++ b/src/pointarray.js @@ -15,6 +15,15 @@ SVG.extend(SVG.PointArray, { return array.join(' ') } + // Convert array to line object +, toLine: function() { + return { + x1: this.value[0][0] + , y1: this.value[0][1] + , x2: this.value[1][0] + , y2: this.value[1][1] + } + } // Get morphed array at given position , at: function(pos) { /* make sure a destination is defined */ |