summaryrefslogtreecommitdiffstats
path: root/src/sugar.js
diff options
context:
space:
mode:
authorwout <wout@impinc.co.uk>2012-12-28 23:20:22 +0100
committerwout <wout@impinc.co.uk>2012-12-28 23:20:22 +0100
commita20c0b1430fb97ff203a9afd6ba6945cf18e58d1 (patch)
tree00d3e0f535b52a1dab50f8705b7efcd5a78d033e /src/sugar.js
parentc8be3da4ddeb80b7ca1a24df07cdca671b35c68a (diff)
downloadsvg.js-a20c0b1430fb97ff203a9afd6ba6945cf18e58d1.tar.gz
svg.js-a20c0b1430fb97ff203a9afd6ba6945cf18e58d1.zip
Added skew method to the sugar module
Diffstat (limited to 'src/sugar.js')
-rw-r--r--src/sugar.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/sugar.js b/src/sugar.js
index bd8454d..10a8716 100644
--- a/src/sugar.js
+++ b/src/sugar.js
@@ -41,6 +41,14 @@ SVG.extend(SVG.Element, {
cx: x == null ? b.cx : x,
cy: y == null ? b.cx : y
});
+ },
+
+ // skew
+ skew: function(x, y) {
+ return this.transform({
+ skewX: x || 0,
+ skewY: y || 0
+ });
}
});