aboutsummaryrefslogtreecommitdiffstats
path: root/dist/svg.js
diff options
context:
space:
mode:
Diffstat (limited to 'dist/svg.js')
-rw-r--r--dist/svg.js28
1 files changed, 21 insertions, 7 deletions
diff --git a/dist/svg.js b/dist/svg.js
index e94fe38..73ff99c 100644
--- a/dist/svg.js
+++ b/dist/svg.js
@@ -6,7 +6,7 @@
* @copyright Wout Fierens <wout@mick-wout.com.com>
* @license MIT
*
-* BUILT: Tue Nov 01 2016 20:04:39 GMT-0400 (EDT)
+* BUILT: Wed Nov 02 2016 18:24:49 GMT-0400 (EDT)
*/;
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
@@ -2391,12 +2391,13 @@ SVG.Matrix = SVG.invent({
}
// Scale matrix
, scale: function(x, y, cx, cy) {
- // support universal scale
- if (arguments.length == 1 || arguments.length == 3)
+ // support uniformal scale
+ if (arguments.length == 1) {
y = x
- if (arguments.length == 3) {
+ } else if (arguments.length == 3) {
cy = cx
cx = y
+ y = x
}
return this.around(cx, cy, new SVG.Matrix(x, 0, 0, y, 0, 0))
@@ -2414,15 +2415,28 @@ SVG.Matrix = SVG.invent({
}
// Skew
, skew: function(x, y, cx, cy) {
- return this.around(cx, cy, this.native().skewX(x || 0).skewY(y || 0))
+ // support uniformal skew
+ if (arguments.length == 1) {
+ y = x
+ } else if (arguments.length == 3) {
+ cy = cx
+ cx = y
+ y = x
+ }
+
+ // convert degrees to radians
+ x = SVG.utils.radians(x)
+ y = SVG.utils.radians(y)
+
+ return this.around(cx, cy, new SVG.Matrix(1, Math.tan(y), Math.tan(x), 1, 0, 0))
}
// SkewX
, skewX: function(x, cx, cy) {
- return this.around(cx, cy, this.native().skewX(x || 0))
+ return this.skew(x, 0, cx, cy)
}
// SkewY
, skewY: function(y, cx, cy) {
- return this.around(cx, cy, this.native().skewY(y || 0))
+ return this.skew(0, y, cx, cy)
}
// Transform around a center point
, around: function(cx, cy, matrix) {