diff options
author | wout <wout@impinc.co.uk> | 2014-07-28 22:16:35 +0200 |
---|---|---|
committer | wout <wout@impinc.co.uk> | 2014-07-28 22:16:35 +0200 |
commit | 5e9ab52bd68670208ac25cfcf95cca178d285545 (patch) | |
tree | 0e83007452b8195886798889d2c7eeabb229d226 /src/sugar.js | |
parent | 0c336f2f4bc931c13779ed6ea3edf62f05f1f18f (diff) | |
download | svg.js-5e9ab52bd68670208ac25cfcf95cca178d285545.tar.gz svg.js-5e9ab52bd68670208ac25cfcf95cca178d285545.zip |
Added more control to SVG.Matrix
Diffstat (limited to 'src/sugar.js')
-rwxr-xr-x | src/sugar.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/sugar.js b/src/sugar.js index 52f5697..cc01c00 100755 --- a/src/sugar.js +++ b/src/sugar.js @@ -34,8 +34,8 @@ SVG.extend(SVG.Element, SVG.FX, { return this.transform({ rotation: d, cx: cx, cy: cy }) } // Map skew to transform -, skew: function(x, y) { - return this.transform({ skewX: x, skewY: y }) +, skew: function(x, y, cx, cy) { + return this.transform({ skewX: x, skewY: y, cx: cx, cy: cy }) } // Map scale to transform , scale: function(x, y, cx, cy) { @@ -47,6 +47,10 @@ SVG.extend(SVG.Element, SVG.FX, { , translate: function(x, y) { return this.transform({ x: x, y: y }) } + // Map flip to transform +, flip: function(a, o) { + return this.transform({ flip: a, offset: o }) + } // Map matrix to transform , matrix: function(m) { return this.attr('transform', new SVG.Matrix(m)) |