summaryrefslogtreecommitdiffstats
path: root/src/pointarray.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/pointarray.js')
-rwxr-xr-xsrc/pointarray.js9
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 */