Arc with zero radius proper conversion to curve

Fixes #430.
master
Dmitry Baranovskiy 2016-08-01 11:37:11 +10:00
parent 2825d0ce65
commit b14d35dd34
5 changed files with 452 additions and 172 deletions

File diff suppressed because one or more lines are too long

153
dist/snap.svg.js vendored
View File

@ -14,7 +14,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
// build: 2016-06-09
// build: 2016-08-01
// Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved.
//
@ -2693,6 +2693,9 @@ Snap.plugin(function (Snap, Element, Paper, glob, Fragment) {
o }
\*/
elproto.getBBox = function (isWithoutTransform) {
if (this.type == "tspan") {
return Snap._.box(this.node.getClientRects().item(0));
}
if (!Snap.Matrix || !Snap.path) {
return this.node.getBBox();
}
@ -3476,10 +3479,12 @@ Snap.plugin(function (Snap, Element, Paper, glob, Fragment) {
anim._callback = callback;
eve("snap.animcreated." + el.id, anim);
eve.once("mina.finish." + anim.id, function () {
eve.off("mina.*." + anim.id);
delete el.anims[anim.id];
callback && callback.call(el);
});
eve.once("mina.stop." + anim.id, function () {
eve.off("mina.*." + anim.id);
delete el.anims[anim.id];
});
return el;
@ -3626,13 +3631,13 @@ Snap.plugin(function (Snap, Element, Paper, glob, Fragment) {
});
// Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved.
//
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//
// http://www.apache.org/licenses/LICENSE-2.0
//
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -3685,30 +3690,48 @@ Snap.plugin(function (Snap, Element, Paper, glob, Fragment) {
- matrix (object) @Matrix
\*/
matrixproto.add = function (a, b, c, d, e, f) {
var out = [[], [], []],
m = [[this.a, this.c, this.e], [this.b, this.d, this.f], [0, 0, 1]],
matrix = [[a, c, e], [b, d, f], [0, 0, 1]],
x, y, z, res;
if (a && a instanceof Matrix) {
matrix = [[a.a, a.c, a.e], [a.b, a.d, a.f], [0, 0, 1]];
return this.add(a.a, a.b, a.c, a.d, a.e, a.f);
}
var aNew = a * this.a + b * this.c,
bNew = a * this.b + b * this.d;
this.e += e * this.a + f * this.c;
this.f += e * this.b + f * this.d;
this.c = c * this.a + d * this.c;
this.d = c * this.b + d * this.d;
for (x = 0; x < 3; x++) {
for (y = 0; y < 3; y++) {
res = 0;
for (z = 0; z < 3; z++) {
res += m[x][z] * matrix[z][y];
}
out[x][y] = res;
}
this.a = aNew;
this.b = bNew;
return this;
};
/*\
* Matrix.multLeft
[ method ]
**
* Multiplies a passed affine transform to the left: M * this.
- a (number)
- b (number)
- c (number)
- d (number)
- e (number)
- f (number)
* or
- matrix (object) @Matrix
\*/
Matrix.prototype.multLeft = function (a, b, c, d, e, f) {
if (a && a instanceof Matrix) {
return this.multLeft(a.a, a.b, a.c, a.d, a.e, a.f);
}
this.a = out[0][0];
this.b = out[1][0];
this.c = out[0][1];
this.d = out[1][1];
this.e = out[0][2];
this.f = out[1][2];
var aNew = a * this.a + c * this.b,
cNew = a * this.c + c * this.d,
eNew = a * this.e + c * this.f + e;
this.b = b * this.a + d * this.b;
this.d = b * this.c + d * this.d;
this.f = b * this.e + d * this.f + f;
this.a = aNew;
this.c = cNew;
this.e = eNew;
return this;
};
/*\
@ -3742,7 +3765,9 @@ Snap.plugin(function (Snap, Element, Paper, glob, Fragment) {
- y (number) vertical offset distance
\*/
matrixproto.translate = function (x, y) {
return this.add(1, 0, 0, 1, x, y);
this.e += tx * this.a + ty * this.c;
this.f += tx * this.b + ty * this.d;
return this;
};
/*\
* Matrix.scale
@ -3756,10 +3781,13 @@ Snap.plugin(function (Snap, Element, Paper, glob, Fragment) {
* Default cx, cy is the middle point of the element.
\*/
matrixproto.scale = function (x, y, cx, cy) {
y == null && (y = x);
(cx || cy) && this.add(1, 0, 0, 1, cx, cy);
this.add(x, 0, 0, y, 0, 0);
(cx || cy) && this.add(1, 0, 0, 1, -cx, -cy);
sy == null && (sy = sx);
(tx || ty) && this.translate(tx, ty);
this.a *= sx;
this.b *= sx;
this.c *= sy;
this.d *= sy;
(tx || ty) && this.translate(-tx, -ty);
return this;
};
/*\
@ -3780,6 +3808,43 @@ Snap.plugin(function (Snap, Element, Paper, glob, Fragment) {
this.add(cos, sin, -sin, cos, x, y);
return this.add(1, 0, 0, 1, -x, -y);
};
/*\
* Matrix.skewX
[ method ]
**
* Skews the matrix along the x-axis
- x (number) Angle to skew along the x-axis (in degrees).
\*/
matrixproto.skewX = function (x) {
return this.skew(x, 0);
};
/*\
* Matrix.skewY
[ method ]
**
* Skews the matrix along the y-axis
- y (number) Angle to skew along the y-axis (in degrees).
\*/
matrixproto.skewY = function (y) {
return this.skew(0, y);
};
/*\
* Matrix.skew
[ method ]
**
* Skews the matrix
- y (number) Angle to skew along the y-axis (in degrees).
- x (number) Angle to skew along the x-axis (in degrees).
\*/
matrixproto.skew = function (x, y) {
x = x || 0;
y = y || 0;
x = Snap.rad(x);
y = Snap.rad(y);
var c = math.tan(x).toFixed(9);
var b = math.tan(y).toFixed(9);
return this.add(1, b, c, 1, 0, 0);
};
/*\
* Matrix.x
[ method ]
@ -3897,7 +3962,7 @@ Snap.plugin(function (Snap, Element, Paper, glob, Fragment) {
s.scalex = +s.scalex.toFixed(4);
s.scaley = +s.scaley.toFixed(4);
s.rotate = +s.rotate.toFixed(4);
return (s.dx || s.dy ? "t" + [+s.dx.toFixed(4), +s.dy.toFixed(4)] : E) +
return (s.dx || s.dy ? "t" + [+s.dx.toFixed(4), +s.dy.toFixed(4)] : E) +
(s.scalex != 1 || s.scaley != 1 ? "s" + [s.scalex, s.scaley, 0, 0] : E) +
(s.rotate ? "r" + [+s.rotate.toFixed(4), 0, 0] : E);
} else {
@ -3934,6 +3999,7 @@ Snap.plugin(function (Snap, Element, Paper, glob, Fragment) {
return new Matrix(a, b, c, d, e, f);
};
});
// Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
@ -5305,13 +5371,13 @@ Snap.plugin(function (Snap, Element, Paper, glob, Fragment) {
});
// Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved.
//
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//
// http://www.apache.org/licenses/LICENSE-2.0
//
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -5726,7 +5792,7 @@ Snap.plugin(function (Snap, Element, Paper, glob) {
return box();
}
path = path2curve(path);
var x = 0,
var x = 0,
y = 0,
X = [],
Y = [],
@ -6067,6 +6133,9 @@ Snap.plugin(function (Snap, Element, Paper, glob) {
Y = x * math.sin(rad) + y * math.cos(rad);
return {x: X, y: Y};
});
if (!rx || !ry) {
return [x1, y1, x2, y2, x2, y2];
}
if (!recursive) {
xy = rotate(x1, y1, -rad);
x1 = xy.x;
@ -6151,7 +6220,7 @@ Snap.plugin(function (Snap, Element, Paper, glob) {
y: pow(t1, 3) * p1y + pow(t1, 2) * 3 * t * c1y + t1 * 3 * t * t * c2y + pow(t, 3) * p2y
};
}
// Returns bounding box of cubic bezier curve.
// Source: http://blog.hackers-cafe.net/2009/06/how-to-calculate-bezier-curves-bounding.html
// Original version: NISHIO Hirokazu
@ -7198,13 +7267,6 @@ Snap.plugin(function (Snap, Element, Paper, glob) {
eve.on("snap.util.equal", function (name, b) {
var A, B, a = Str(this.attr(name) || ""),
el = this;
if (isNumeric(a) && isNumeric(b)) {
return {
from: parseFloat(a),
to: parseFloat(b),
f: getNumber
};
}
if (names[name] == "colour") {
A = Snap.color(a);
B = Snap.color(b);
@ -7251,6 +7313,13 @@ Snap.plugin(function (Snap, Element, Paper, glob) {
f: function (val) { return val; }
};
}
if (isNumeric(a) && isNumeric(b)) {
return {
from: parseFloat(a),
to: parseFloat(b),
f: getNumber
};
}
var aUnit = a.match(reUnit),
bUnit = Str(b).match(reUnit);
if (aUnit && arrayEqual(aUnit, bUnit)) {

View File

@ -12,13 +12,11 @@ pre[class*="language-"] {
text-shadow: 0 -.1em .2em black;
white-space: pre;
word-spacing: normal;
word-break: normal;
line-height: 1.5;
-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;
-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
@ -35,34 +33,17 @@ pre[class*="language-"] {
margin: .5em 0;
overflow: auto;
}
pre[class*="language-"]::selection {
/* Safari */
background: hsl(200, 4%, 16%); /* #282A2B */
pre[class*="language-"]::selection { /* Safari */
background:hsl(200, 4%, 16%); /* #282A2B */
}
pre[class*="language-"]::selection {
/* Firefox */
background: hsl(200, 4%, 16%); /* #282A2B */
}
/* Text Selection colour */
pre[class*="language-"]::-moz-selection, pre[class*="language-"] ::-moz-selection,
code[class*="language-"]::-moz-selection, code[class*="language-"] ::-moz-selection {
text-shadow: none;
background: hsla(0, 0%, 93%, 0.15); /* #EDEDED */
}
pre[class*="language-"]::selection, pre[class*="language-"] ::selection,
code[class*="language-"]::selection, code[class*="language-"] ::selection {
text-shadow: none;
background: hsla(0, 0%, 93%, 0.15); /* #EDEDED */
pre[class*="language-"]::selection { /* Firefox */
background:hsl(200, 4%, 16%); /* #282A2B */
}
/* Inline code */
:not(pre) > code[class*="language-"] {
border-radius: .3em;
border: .13em solid hsl(0, 0%, 33%); /* #545454 */
border: .13em solid hsl(0,0%,33%); /* #545454 */
box-shadow: 1px 1px .3em -.1em black inset;
padding: .15em .2em .05em;
}
@ -84,36 +65,28 @@ code[class*="language-"]::selection, code[class*="language-"] ::selection {
.token.tag,
.token.boolean,
.token.number,
.token.deleted {
.token.number {
color: hsl(14, 58%, 55%); /* #CF6A4C */
}
.token.keyword,
.token.property,
.token.selector,
.token.constant,
.token.symbol,
.token.builtin {
color: hsl(53, 89%, 79%); /* #F9EE98 */
.token.selector {
color:hsl(53, 89%, 79%); /* #F9EE98 */
}
.token.attr-name,
.token.attr-value,
.token.string,
.token.char,
.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string,
.token.variable,
.token.inserted {
color: hsl(76, 21%, 52%); /* #8F9D6A */
.style .token.string {
color:hsl(76, 21%, 52%); /* #8F9D6A */
}
.token.atrule {
color: hsl(218, 22%, 55%); /* #7587A6 */
color:hsl(218, 22%, 55%); /* #7587A6 */
}
.token.regex,
@ -121,18 +94,13 @@ code[class*="language-"]::selection, code[class*="language-"] ::selection {
color: hsl(42, 75%, 65%); /* #E9C062 */
}
.token.important,
.token.bold {
.token.important {
font-weight: bold;
}
.token.italic {
font-style: italic;
}
.token.entity {
cursor: help;
}
pre[data-line] {
padding: 1em 0 1em 3em;
position: relative;
@ -141,24 +109,31 @@ pre[data-line] {
/* Markup */
.language-markup .token.tag,
.language-markup .token.attr-name,
.language-markup .token.punctuation {
.language-markup .token.punctuation {
color: hsl(33, 33%, 52%); /* #AC885B */
}
/* Text Selection colour */
::selection {
background: hsla(0,0%,93%,0.15); /* #EDEDED */
}
::-moz-selection {
background: hsla(0,0%,93%,0.15); /* #EDEDED */
}
/* Make the tokens sit above the line highlight so the colours don't look faded. */
.token {
position: relative;
z-index: 1;
position:relative;
z-index:1;
}
.line-highlight {
background: -moz-linear-gradient(left, hsla(0, 0%, 33%, .1) 70%, hsla(0, 0%, 33%, 0)); /* #545454 */
background: -o-linear-gradient(left, hsla(0, 0%, 33%, .1) 70%, hsla(0, 0%, 33%, 0)); /* #545454 */
background: -webkit-linear-gradient(left, hsla(0, 0%, 33%, .1) 70%, hsla(0, 0%, 33%, 0)); /* #545454 */
background: -moz-linear-gradient(left, hsla(0, 0%, 33%,.1) 70%, hsla(0, 0%, 33%,0)); /* #545454 */
background: -o-linear-gradient(left, hsla(0, 0%, 33%,.1) 70%, hsla(0, 0%, 33%,0)); /* #545454 */
background: -webkit-linear-gradient(left, hsla(0, 0%, 33%,.1) 70%, hsla(0, 0%, 33%,0)); /* #545454 */
background: hsla(0, 0%, 33%, 0.25); /* #545454 */
background: linear-gradient(left, hsla(0, 0%, 33%, .1) 70%, hsla(0, 0%, 33%, 0)); /* #545454 */
border-bottom: 1px dashed hsl(0, 0%, 33%); /* #545454 */
border-top: 1px dashed hsl(0, 0%, 33%); /* #545454 */
background: linear-gradient(left, hsla(0, 0%, 33%,.1) 70%, hsla(0, 0%, 33%,0)); /* #545454 */
border-bottom:1px dashed hsl(0, 0%, 33%); /* #545454 */
border-top:1px dashed hsl(0, 0%, 33%); /* #545454 */
left: 0;
line-height: inherit;
margin-top: 0.75em; /* Same as .prisms padding-top */
@ -167,9 +142,8 @@ pre[data-line] {
position: absolute;
right: 0;
white-space: pre;
z-index: 0;
z-index:0;
}
.line-highlight:before,
.line-highlight[data-end]:after {
background-color: hsl(215, 15%, 59%); /* #8794A6 */
@ -187,9 +161,8 @@ pre[data-line] {
top: .4em;
vertical-align: .3em;
}
.line-highlight[data-end]:after {
bottom: .4em;
content: attr(data-end);
top: auto;
}
}

View File

@ -371,6 +371,10 @@
<a href="#Matrix.invert" class="dr-method"><span>Matrix.invert()</span></a>
</li>
<li class="dr-lvl1">
<a href="#Matrix.multLeft" class="dr-method"><span>Matrix.multLeft()</span></a>
</li>
<li class="dr-lvl1">
<a href="#Matrix.rotate" class="dr-method"><span>Matrix.rotate()</span></a>
</li>
@ -379,6 +383,18 @@
<a href="#Matrix.scale" class="dr-method"><span>Matrix.scale()</span></a>
</li>
<li class="dr-lvl1">
<a href="#Matrix.skew" class="dr-method"><span>Matrix.skew()</span></a>
</li>
<li class="dr-lvl1">
<a href="#Matrix.skewX" class="dr-method"><span>Matrix.skewX()</span></a>
</li>
<li class="dr-lvl1">
<a href="#Matrix.skewY" class="dr-method"><span>Matrix.skewY()</span></a>
</li>
<li class="dr-lvl1">
<a href="#Matrix.split" class="dr-method"><span>Matrix.split()</span></a>
</li>
@ -4528,7 +4544,7 @@ prototypes). This allow you to extend anything you want.
<article id="Element.transform">
<header>
<h3 class="dr-method">Element.transform(tstr)<a href="#Element.transform" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 141 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L141">&#x27ad;</a></h3>
<h3 class="dr-method">Element.transform(tstr)<a href="#Element.transform" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 144 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L144">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.transform-extra"></div>
@ -4692,7 +4708,7 @@ prototypes). This allow you to extend anything you want.
<article id="Element.parent">
<header>
<h3 class="dr-method">Element.parent()<a href="#Element.parent" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 199 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L199">&#x27ad;</a></h3>
<h3 class="dr-method">Element.parent()<a href="#Element.parent" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 202 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L202">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.parent-extra"></div>
@ -4734,7 +4750,7 @@ prototypes). This allow you to extend anything you want.
<article id="Element.append">
<header>
<h3 class="dr-method">Element.append(el)<a href="#Element.append" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 211 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L211">&#x27ad;</a></h3>
<h3 class="dr-method">Element.append(el)<a href="#Element.append" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 214 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L214">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.append-extra"></div>
@ -4794,7 +4810,7 @@ prototypes). This allow you to extend anything you want.
<article id="Element.add">
<header>
<h3 class="dr-method">Element.add()<a href="#Element.add" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 217 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L217">&#x27ad;</a></h3>
<h3 class="dr-method">Element.add()<a href="#Element.add" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 220 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L220">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.add-extra"></div>
@ -4819,7 +4835,7 @@ prototypes). This allow you to extend anything you want.
<article id="Element.appendTo">
<header>
<h3 class="dr-method">Element.appendTo(el)<a href="#Element.appendTo" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 241 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L241">&#x27ad;</a></h3>
<h3 class="dr-method">Element.appendTo(el)<a href="#Element.appendTo" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 244 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L244">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.appendTo-extra"></div>
@ -4879,7 +4895,7 @@ prototypes). This allow you to extend anything you want.
<article id="Element.prepend">
<header>
<h3 class="dr-method">Element.prepend(el)<a href="#Element.prepend" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 257 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L257">&#x27ad;</a></h3>
<h3 class="dr-method">Element.prepend(el)<a href="#Element.prepend" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 260 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L260">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.prepend-extra"></div>
@ -4939,7 +4955,7 @@ prototypes). This allow you to extend anything you want.
<article id="Element.prependTo">
<header>
<h3 class="dr-method">Element.prependTo(el)<a href="#Element.prependTo" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 291 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L291">&#x27ad;</a></h3>
<h3 class="dr-method">Element.prependTo(el)<a href="#Element.prependTo" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 294 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L294">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.prependTo-extra"></div>
@ -4999,7 +5015,7 @@ prototypes). This allow you to extend anything you want.
<article id="Element.before">
<header>
<h3 class="dr-method">Element.before(el)<a href="#Element.before" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 305 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L305">&#x27ad;</a></h3>
<h3 class="dr-method">Element.before(el)<a href="#Element.before" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 308 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L308">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.before-extra"></div>
@ -5059,7 +5075,7 @@ prototypes). This allow you to extend anything you want.
<article id="Element.after">
<header>
<h3 class="dr-method">Element.after(el)<a href="#Element.after" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 333 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L333">&#x27ad;</a></h3>
<h3 class="dr-method">Element.after(el)<a href="#Element.after" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 336 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L336">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.after-extra"></div>
@ -5119,7 +5135,7 @@ prototypes). This allow you to extend anything you want.
<article id="Element.insertBefore">
<header>
<h3 class="dr-method">Element.insertBefore(el)<a href="#Element.insertBefore" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 355 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L355">&#x27ad;</a></h3>
<h3 class="dr-method">Element.insertBefore(el)<a href="#Element.insertBefore" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 358 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L358">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.insertBefore-extra"></div>
@ -5179,7 +5195,7 @@ prototypes). This allow you to extend anything you want.
<article id="Element.insertAfter">
<header>
<h3 class="dr-method">Element.insertAfter(el)<a href="#Element.insertAfter" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 373 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L373">&#x27ad;</a></h3>
<h3 class="dr-method">Element.insertAfter(el)<a href="#Element.insertAfter" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 376 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L376">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.insertAfter-extra"></div>
@ -5239,7 +5255,7 @@ prototypes). This allow you to extend anything you want.
<article id="Element.remove">
<header>
<h3 class="dr-method">Element.remove()<a href="#Element.remove" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 389 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L389">&#x27ad;</a></h3>
<h3 class="dr-method">Element.remove()<a href="#Element.remove" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 392 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L392">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.remove-extra"></div>
@ -5281,7 +5297,7 @@ prototypes). This allow you to extend anything you want.
<article id="Element.select">
<header>
<h3 class="dr-method">Element.select(query)<a href="#Element.select" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 406 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L406">&#x27ad;</a></h3>
<h3 class="dr-method">Element.select(query)<a href="#Element.select" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 409 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L409">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.select-extra"></div>
@ -5341,7 +5357,7 @@ prototypes). This allow you to extend anything you want.
<article id="Element.selectAll">
<header>
<h3 class="dr-method">Element.selectAll(query)<a href="#Element.selectAll" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 418 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L418">&#x27ad;</a></h3>
<h3 class="dr-method">Element.selectAll(query)<a href="#Element.selectAll" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 421 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L421">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.selectAll-extra"></div>
@ -5403,7 +5419,7 @@ prototypes). This allow you to extend anything you want.
<article id="Element.asPX">
<header>
<h3 class="dr-method">Element.asPX(attr, [value])<a href="#Element.asPX" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 436 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L436">&#x27ad;</a></h3>
<h3 class="dr-method">Element.asPX(attr, [value])<a href="#Element.asPX" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 439 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L439">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.asPX-extra"></div>
@ -5466,7 +5482,7 @@ prototypes). This allow you to extend anything you want.
<article id="Element.use">
<header>
<h3 class="dr-method">Element.use()<a href="#Element.use" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 451 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L451">&#x27ad;</a></h3>
<h3 class="dr-method">Element.use()<a href="#Element.use" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 454 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L454">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.use-extra"></div>
@ -5508,7 +5524,7 @@ prototypes). This allow you to extend anything you want.
<article id="Element.clone">
<header>
<h3 class="dr-method">Element.clone()<a href="#Element.clone" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 542 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L542">&#x27ad;</a></h3>
<h3 class="dr-method">Element.clone()<a href="#Element.clone" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 545 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L545">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.clone-extra"></div>
@ -5550,7 +5566,7 @@ prototypes). This allow you to extend anything you want.
<article id="Element.toDefs">
<header>
<h3 class="dr-method">Element.toDefs()<a href="#Element.toDefs" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 559 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L559">&#x27ad;</a></h3>
<h3 class="dr-method">Element.toDefs()<a href="#Element.toDefs" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 562 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L562">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.toDefs-extra"></div>
@ -5592,7 +5608,7 @@ prototypes). This allow you to extend anything you want.
<article id="Element.toPattern">
<header>
<h3 class="dr-method">Element.toPattern(x, y, width, height)<a href="#Element.toPattern" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 587 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L587">&#x27ad;</a></h3>
<h3 class="dr-method">Element.toPattern(x, y, width, height)<a href="#Element.toPattern" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 590 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L590">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.toPattern-extra"></div>
@ -5692,7 +5708,7 @@ c.attr({
<article id="Element.marker">
<header>
<h3 class="dr-method">Element.marker(x, y, width, height, refX, refY)<a href="#Element.marker" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 628 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L628">&#x27ad;</a></h3>
<h3 class="dr-method">Element.marker(x, y, width, height, refX, refY)<a href="#Element.marker" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 631 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L631">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.marker-extra"></div>
@ -5779,7 +5795,7 @@ To create a marker you have to specify the bounding rect and reference point:
<article id="Snap.animation">
<header>
<h3 class="dr-method">Snap.animation(attr, duration, [easing], [callback])<a href="#Snap.animation" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 687 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L687">&#x27ad;</a></h3>
<h3 class="dr-method">Snap.animation(attr, duration, [easing], [callback])<a href="#Snap.animation" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 690 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L690">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Snap.animation-extra"></div>
@ -5848,7 +5864,7 @@ To create a marker you have to specify the bounding rect and reference point:
<article id="Element.inAnim">
<header>
<h3 class="dr-method">Element.inAnim()<a href="#Element.inAnim" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 705 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L705">&#x27ad;</a></h3>
<h3 class="dr-method">Element.inAnim()<a href="#Element.inAnim" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 708 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L708">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.inAnim-extra"></div>
@ -5950,7 +5966,7 @@ To create a marker you have to specify the bounding rect and reference point:
<article id="Snap.animate">
<header>
<h3 class="dr-method">Snap.animate(from, to, setter, duration, [easing], [callback])<a href="#Snap.animate" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 755 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L755">&#x27ad;</a></h3>
<h3 class="dr-method">Snap.animate(from, to, setter, duration, [easing], [callback])<a href="#Snap.animate" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 758 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L758">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Snap.animate-extra"></div>
@ -6111,7 +6127,7 @@ rect.animate({x: 10}, 1000);</code></pre></section>
<article id="Element.stop">
<header>
<h3 class="dr-method">Element.stop()<a href="#Element.stop" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 773 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L773">&#x27ad;</a></h3>
<h3 class="dr-method">Element.stop()<a href="#Element.stop" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 776 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L776">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.stop-extra"></div>
@ -6153,7 +6169,7 @@ rect.animate({x: 10}, 1000);</code></pre></section>
<article id="Element.animate">
<header>
<h3 class="dr-method">Element.animate(attrs, duration, [easing], [callback])<a href="#Element.animate" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 792 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L792">&#x27ad;</a></h3>
<h3 class="dr-method">Element.animate(attrs, duration, [easing], [callback])<a href="#Element.animate" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 795 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L795">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.animate-extra"></div>
@ -6222,7 +6238,7 @@ rect.animate({x: 10}, 1000);</code></pre></section>
<article id="Element.data">
<header>
<h3 class="dr-method">Element.data(key, [value])<a href="#Element.data" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 865 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L865">&#x27ad;</a></h3>
<h3 class="dr-method">Element.data(key, [value])<a href="#Element.data" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 870 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L870">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.data-extra"></div>
@ -6344,7 +6360,7 @@ with <code>data-</code> attributes)
<article id="Element.removeData">
<header>
<h3 class="dr-method">Element.removeData([key])<a href="#Element.removeData" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 894 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L894">&#x27ad;</a></h3>
<h3 class="dr-method">Element.removeData([key])<a href="#Element.removeData" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 899 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L899">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.removeData-extra"></div>
@ -6405,7 +6421,7 @@ If key is not provided, removes all the data of the element.
<article id="Element.outerSVG">
<header>
<h3 class="dr-method">Element.outerSVG()<a href="#Element.outerSVG" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 911 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L911">&#x27ad;</a></h3>
<h3 class="dr-method">Element.outerSVG()<a href="#Element.outerSVG" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 916 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L916">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.outerSVG-extra"></div>
@ -6448,7 +6464,7 @@ If key is not provided, removes all the data of the element.
<article id="Element.toString">
<header>
<h3 class="dr-method">Element.toString()<a href="#Element.toString" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 917 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L917">&#x27ad;</a></h3>
<h3 class="dr-method">Element.toString()<a href="#Element.toString" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 922 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L922">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.toString-extra"></div>
@ -6473,7 +6489,7 @@ If key is not provided, removes all the data of the element.
<article id="Element.innerSVG">
<header>
<h3 class="dr-method">Element.innerSVG()<a href="#Element.innerSVG" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 925 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L925">&#x27ad;</a></h3>
<h3 class="dr-method">Element.innerSVG()<a href="#Element.innerSVG" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 930 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L930">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.innerSVG-extra"></div>
@ -6515,7 +6531,7 @@ If key is not provided, removes all the data of the element.
<article id="Fragment.select">
<header>
<h3 class="dr-method">Fragment.select()<a href="#Fragment.select" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 972 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L972">&#x27ad;</a></h3>
<h3 class="dr-method">Fragment.select()<a href="#Fragment.select" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 977 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L977">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Fragment.select-extra"></div>
@ -6540,7 +6556,7 @@ If key is not provided, removes all the data of the element.
<article id="Fragment.selectAll">
<header>
<h3 class="dr-method">Fragment.selectAll()<a href="#Fragment.selectAll" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 979 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L979">&#x27ad;</a></h3>
<h3 class="dr-method">Fragment.selectAll()<a href="#Fragment.selectAll" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 984 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L984">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Fragment.selectAll-extra"></div>
@ -6630,6 +6646,93 @@ If key is not provided, removes all the data of the element.
<div class="topcoat-list__container">
<h3 class="topcoat-list__header">Parameters</h3>
<ol class="topcoat-list">
<li class="topcoat-list__item"><span class="dr-param">matrix</span>
<span class="dr-type"><em class="dr-type-object">object</em> </span>
<span class="dr-description"><a href="#Matrix" class="dr-link">Matrix</a></span></li>
</ol>
</div>
</div>
</section>
</article>
<article id="Matrix.multLeft">
<header>
<h3 class="dr-method">Matrix.multLeft(…)<a href="#Matrix.multLeft" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 89 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L89">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Matrix.multLeft-extra"></div>
<div class="dr-method">
<p>Multiplies a passed affine transform to the left: M * this.
</p>
<div class="topcoat-list__container">
<h3 class="topcoat-list__header">Parameters</h3>
<ol class="topcoat-list">
<li class="topcoat-list__item"><span class="dr-param">a</span>
<span class="dr-type"><em class="dr-type-number">number</em> </span>
<span class="dr-description"></span></li>
<li class="topcoat-list__item"><span class="dr-param">b</span>
<span class="dr-type"><em class="dr-type-number">number</em> </span>
<span class="dr-description"></span></li>
<li class="topcoat-list__item"><span class="dr-param">c</span>
<span class="dr-type"><em class="dr-type-number">number</em> </span>
<span class="dr-description"></span></li>
<li class="topcoat-list__item"><span class="dr-param">d</span>
<span class="dr-type"><em class="dr-type-number">number</em> </span>
<span class="dr-description"></span></li>
<li class="topcoat-list__item"><span class="dr-param">e</span>
<span class="dr-type"><em class="dr-type-number">number</em> </span>
<span class="dr-description"></span></li>
<li class="topcoat-list__item"><span class="dr-param">f</span>
<span class="dr-type"><em class="dr-type-number">number</em> </span>
<span class="dr-description"></span></li>
</ol>
</div>
<p>or
</p>
<div class="topcoat-list__container">
<h3 class="topcoat-list__header">Parameters</h3>
<ol class="topcoat-list">
@ -6652,7 +6755,7 @@ If key is not provided, removes all the data of the element.
<article id="Matrix.invert">
<header>
<h3 class="dr-method">Matrix.invert()<a href="#Matrix.invert" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 94 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L94">&#x27ad;</a></h3>
<h3 class="dr-method">Matrix.invert()<a href="#Matrix.invert" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 112 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L112">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Matrix.invert-extra"></div>
@ -6694,7 +6797,7 @@ If key is not provided, removes all the data of the element.
<article id="Matrix.clone">
<header>
<h3 class="dr-method">Matrix.clone()<a href="#Matrix.clone" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 106 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L106">&#x27ad;</a></h3>
<h3 class="dr-method">Matrix.clone()<a href="#Matrix.clone" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 124 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L124">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Matrix.clone-extra"></div>
@ -6736,7 +6839,7 @@ If key is not provided, removes all the data of the element.
<article id="Matrix.translate">
<header>
<h3 class="dr-method">Matrix.translate(x, y)<a href="#Matrix.translate" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 117 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L117">&#x27ad;</a></h3>
<h3 class="dr-method">Matrix.translate(x, y)<a href="#Matrix.translate" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 135 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L135">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Matrix.translate-extra"></div>
@ -6782,7 +6885,7 @@ If key is not provided, removes all the data of the element.
<article id="Matrix.scale">
<header>
<h3 class="dr-method">Matrix.scale(x, [y], [cx], [cy])<a href="#Matrix.scale" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 131 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L131">&#x27ad;</a></h3>
<h3 class="dr-method">Matrix.scale(x, [y], [cx], [cy])<a href="#Matrix.scale" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 151 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L151">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Matrix.scale-extra"></div>
@ -6845,7 +6948,7 @@ If key is not provided, removes all the data of the element.
<article id="Matrix.rotate">
<header>
<h3 class="dr-method">Matrix.rotate(a, x, y)<a href="#Matrix.rotate" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 147 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L147">&#x27ad;</a></h3>
<h3 class="dr-method">Matrix.rotate(a, x, y)<a href="#Matrix.rotate" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 170 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L170">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Matrix.rotate-extra"></div>
@ -6888,13 +6991,145 @@ If key is not provided, removes all the data of the element.
</div>
</section>
</article>
<article id="Matrix.skewX">
<header>
<h3 class="dr-method">Matrix.skewX(x)<a href="#Matrix.skewX" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 186 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L186">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Matrix.skewX-extra"></div>
<div class="dr-method">
<p>Skews the matrix along the x-axis
</p>
<div class="topcoat-list__container">
<h3 class="topcoat-list__header">Parameters</h3>
<ol class="topcoat-list">
<li class="topcoat-list__item"><span class="dr-param">x</span>
<span class="dr-type"><em class="dr-type-number">number</em> </span>
<span class="dr-description">Angle to skew along the x-axis (in degrees).</span></li>
</ol>
</div>
</div>
</section>
</article>
<article id="Matrix.skewY">
<header>
<h3 class="dr-method">Matrix.skewY(y)<a href="#Matrix.skewY" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 196 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L196">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Matrix.skewY-extra"></div>
<div class="dr-method">
<p>Skews the matrix along the y-axis
</p>
<div class="topcoat-list__container">
<h3 class="topcoat-list__header">Parameters</h3>
<ol class="topcoat-list">
<li class="topcoat-list__item"><span class="dr-param">y</span>
<span class="dr-type"><em class="dr-type-number">number</em> </span>
<span class="dr-description">Angle to skew along the y-axis (in degrees).</span></li>
</ol>
</div>
</div>
</section>
</article>
<article id="Matrix.skew">
<header>
<h3 class="dr-method">Matrix.skew(y, x)<a href="#Matrix.skew" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 207 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L207">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Matrix.skew-extra"></div>
<div class="dr-method">
<p>Skews the matrix
</p>
<div class="topcoat-list__container">
<h3 class="topcoat-list__header">Parameters</h3>
<ol class="topcoat-list">
<li class="topcoat-list__item"><span class="dr-param">y</span>
<span class="dr-type"><em class="dr-type-number">number</em> </span>
<span class="dr-description">Angle to skew along the y-axis (in degrees).</span></li>
<li class="topcoat-list__item"><span class="dr-param">x</span>
<span class="dr-type"><em class="dr-type-number">number</em> </span>
<span class="dr-description">Angle to skew along the x-axis (in degrees).</span></li>
</ol>
</div>
</div>
</section>
</article>
<article id="Matrix.x">
<header>
<h3 class="dr-method">Matrix.x(x, y)<a href="#Matrix.x" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 165 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L165">&#x27ad;</a></h3>
<h3 class="dr-method">Matrix.x(x, y)<a href="#Matrix.x" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 225 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L225">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Matrix.x-extra"></div>
@ -6957,7 +7192,7 @@ If key is not provided, removes all the data of the element.
<article id="Matrix.y">
<header>
<h3 class="dr-method">Matrix.y(x, y)<a href="#Matrix.y" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 177 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L177">&#x27ad;</a></h3>
<h3 class="dr-method">Matrix.y(x, y)<a href="#Matrix.y" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 237 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L237">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Matrix.y-extra"></div>
@ -7020,7 +7255,7 @@ If key is not provided, removes all the data of the element.
<article id="Matrix.determinant">
<header>
<h3 class="dr-method">Matrix.determinant()<a href="#Matrix.determinant" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 204 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L204">&#x27ad;</a></h3>
<h3 class="dr-method">Matrix.determinant()<a href="#Matrix.determinant" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 264 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L264">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Matrix.determinant-extra"></div>
@ -7062,7 +7297,7 @@ If key is not provided, removes all the data of the element.
<article id="Matrix.split">
<header>
<h3 class="dr-method">Matrix.split()<a href="#Matrix.split" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 221 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L221">&#x27ad;</a></h3>
<h3 class="dr-method">Matrix.split()<a href="#Matrix.split" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 281 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L281">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Matrix.split-extra"></div>
@ -7172,7 +7407,7 @@ If key is not provided, removes all the data of the element.
<article id="Matrix.toTransformString">
<header>
<h3 class="dr-method">Matrix.toTransformString()<a href="#Matrix.toTransformString" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 267 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L267">&#x27ad;</a></h3>
<h3 class="dr-method">Matrix.toTransformString()<a href="#Matrix.toTransformString" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 327 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L327">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Matrix.toTransformString-extra"></div>
@ -7214,7 +7449,7 @@ If key is not provided, removes all the data of the element.
<article id="Snap.Matrix">
<header>
<h3 class="dr-method">Snap.Matrix()<a href="#Snap.Matrix" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 288 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L288">&#x27ad;</a></h3>
<h3 class="dr-method">Snap.Matrix()<a href="#Snap.Matrix" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 348 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L348">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Snap.Matrix-extra"></div>
@ -7240,7 +7475,7 @@ To create matrices use <a href="#Snap.matrix" class="dr-link">Snap.matrix</a>.
<article id="Snap.matrix">
<header>
<h3 class="dr-method">Snap.matrix(…)<a href="#Snap.matrix" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 306 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L306">&#x27ad;</a></h3>
<h3 class="dr-method">Snap.matrix(…)<a href="#Snap.matrix" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 366 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L366">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Snap.matrix-extra"></div>
@ -12665,7 +12900,7 @@ the classs presence or the value of the <code>flag</code> argument.
<article id="Snap.path.getTotalLength">
<header>
<h3 class="dr-method">Snap.path.getTotalLength(path)<a href="#Snap.path.getTotalLength" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1127 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1127">&#x27ad;</a></h3>
<h3 class="dr-method">Snap.path.getTotalLength(path)<a href="#Snap.path.getTotalLength" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1130 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1130">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Snap.path.getTotalLength-extra"></div>
@ -12725,7 +12960,7 @@ the classs presence or the value of the <code>flag</code> argument.
<article id="Snap.path.getPointAtLength">
<header>
<h3 class="dr-method">Snap.path.getPointAtLength(path, length)<a href="#Snap.path.getPointAtLength" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1144 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1144">&#x27ad;</a></h3>
<h3 class="dr-method">Snap.path.getPointAtLength(path, length)<a href="#Snap.path.getPointAtLength" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1147 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1147">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Snap.path.getPointAtLength-extra"></div>
@ -12832,7 +13067,7 @@ the classs presence or the value of the <code>flag</code> argument.
<article id="Snap.path.getSubpath">
<header>
<h3 class="dr-method">Snap.path.getSubpath(path, from, to)<a href="#Snap.path.getSubpath" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1157 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1157">&#x27ad;</a></h3>
<h3 class="dr-method">Snap.path.getSubpath(path, from, to)<a href="#Snap.path.getSubpath" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1160 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1160">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Snap.path.getSubpath-extra"></div>
@ -12898,7 +13133,7 @@ the classs presence or the value of the <code>flag</code> argument.
<article id="Element.getTotalLength">
<header>
<h3 class="dr-method">Element.getTotalLength()<a href="#Element.getTotalLength" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1171 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1171">&#x27ad;</a></h3>
<h3 class="dr-method">Element.getTotalLength()<a href="#Element.getTotalLength" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1174 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1174">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.getTotalLength-extra"></div>
@ -12940,7 +13175,7 @@ the classs presence or the value of the <code>flag</code> argument.
<article id="Element.getPointAtLength">
<header>
<h3 class="dr-method">Element.getPointAtLength(length)<a href="#Element.getPointAtLength" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1192 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1192">&#x27ad;</a></h3>
<h3 class="dr-method">Element.getPointAtLength(length)<a href="#Element.getPointAtLength" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1195 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1195">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.getPointAtLength-extra"></div>
@ -13044,7 +13279,7 @@ the classs presence or the value of the <code>flag</code> argument.
<article id="Element.getSubpath">
<header>
<h3 class="dr-method">Element.getSubpath(from, to)<a href="#Element.getSubpath" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1207 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1207">&#x27ad;</a></h3>
<h3 class="dr-method">Element.getSubpath(from, to)<a href="#Element.getSubpath" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1210 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1210">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.getSubpath-extra"></div>
@ -13107,7 +13342,7 @@ the classs presence or the value of the <code>flag</code> argument.
<article id="Snap.path.findDotsAtSegment">
<header>
<h3 class="dr-method">Snap.path.findDotsAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t)<a href="#Snap.path.findDotsAtSegment" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1250 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1250">&#x27ad;</a></h3>
<h3 class="dr-method">Snap.path.findDotsAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t)<a href="#Snap.path.findDotsAtSegment" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1253 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1253">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Snap.path.findDotsAtSegment-extra"></div>
@ -13332,7 +13567,7 @@ Finds dot coordinates on the given cubic beziér curve at the given t
<article id="Snap.path.bezierBBox">
<header>
<h3 class="dr-method">Snap.path.bezierBBox(…)<a href="#Snap.path.bezierBBox" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1278 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1278">&#x27ad;</a></h3>
<h3 class="dr-method">Snap.path.bezierBBox(…)<a href="#Snap.path.bezierBBox" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1281 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1281">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Snap.path.bezierBBox-extra"></div>
@ -13511,7 +13746,7 @@ Returns the bounding box of a given cubic beziér curve
<article id="Snap.path.isPointInsideBBox">
<header>
<h3 class="dr-method">Snap.path.isPointInsideBBox(bbox, x, y)<a href="#Snap.path.isPointInsideBBox" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1291 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1291">&#x27ad;</a></h3>
<h3 class="dr-method">Snap.path.isPointInsideBBox(bbox, x, y)<a href="#Snap.path.isPointInsideBBox" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1294 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1294">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Snap.path.isPointInsideBBox-extra"></div>
@ -13578,7 +13813,7 @@ Returns <code>true</code> if given point is inside bounding box
<article id="Snap.path.isBBoxIntersect">
<header>
<h3 class="dr-method">Snap.path.isBBoxIntersect(bbox1, bbox2)<a href="#Snap.path.isBBoxIntersect" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1348 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1348">&#x27ad;</a></h3>
<h3 class="dr-method">Snap.path.isBBoxIntersect(bbox1, bbox2)<a href="#Snap.path.isBBoxIntersect" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1351 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1351">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Snap.path.isBBoxIntersect-extra"></div>
@ -13642,7 +13877,7 @@ Returns <code>true</code> if two bounding boxes intersect
<article id="Snap.path.intersection">
<header>
<h3 class="dr-method">Snap.path.intersection(path1, path2)<a href="#Snap.path.intersection" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1372 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1372">&#x27ad;</a></h3>
<h3 class="dr-method">Snap.path.intersection(path1, path2)<a href="#Snap.path.intersection" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1375 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1375">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Snap.path.intersection-extra"></div>
@ -13798,7 +14033,7 @@ Finds intersections of two paths
<article id="Snap.path.isPointInside">
<header>
<h3 class="dr-method">Snap.path.isPointInside(path, x, y)<a href="#Snap.path.isPointInside" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1388 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1388">&#x27ad;</a></h3>
<h3 class="dr-method">Snap.path.isPointInside(path, x, y)<a href="#Snap.path.isPointInside" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1391 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1391">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Snap.path.isPointInside-extra"></div>
@ -13866,7 +14101,7 @@ Returns <code>true</code> if given point is inside a given closed path.
<article id="Snap.path.getBBox">
<header>
<h3 class="dr-method">Snap.path.getBBox(path)<a href="#Snap.path.getBBox" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1407 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1407">&#x27ad;</a></h3>
<h3 class="dr-method">Snap.path.getBBox(path)<a href="#Snap.path.getBBox" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1410 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1410">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Snap.path.getBBox-extra"></div>
@ -13995,7 +14230,7 @@ Returns the bounding box of a given path
<article id="Snap.path.toRelative">
<header>
<h3 class="dr-method">Snap.path.toRelative(path)<a href="#Snap.path.toRelative" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1419 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1419">&#x27ad;</a></h3>
<h3 class="dr-method">Snap.path.toRelative(path)<a href="#Snap.path.toRelative" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1422 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1422">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Snap.path.toRelative-extra"></div>
@ -14056,7 +14291,7 @@ Converts path coordinates into relative values
<article id="Snap.path.toAbsolute">
<header>
<h3 class="dr-method">Snap.path.toAbsolute(path)<a href="#Snap.path.toAbsolute" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1430 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1430">&#x27ad;</a></h3>
<h3 class="dr-method">Snap.path.toAbsolute(path)<a href="#Snap.path.toAbsolute" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1433 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1433">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Snap.path.toAbsolute-extra"></div>
@ -14117,7 +14352,7 @@ Converts path coordinates into absolute values
<article id="Snap.path.toCubic">
<header>
<h3 class="dr-method">Snap.path.toCubic(pathString)<a href="#Snap.path.toCubic" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1441 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1441">&#x27ad;</a></h3>
<h3 class="dr-method">Snap.path.toCubic(pathString)<a href="#Snap.path.toCubic" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1444 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1444">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Snap.path.toCubic-extra"></div>
@ -14178,7 +14413,7 @@ Converts path to a new path where all segments are cubic beziér curves
<article id="Snap.path.map">
<header>
<h3 class="dr-method">Snap.path.map(path, matrix)<a href="#Snap.path.map" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1451 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1451">&#x27ad;</a></h3>
<h3 class="dr-method">Snap.path.map(path, matrix)<a href="#Snap.path.map" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1454 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1454">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Snap.path.map-extra"></div>

View File

@ -1,11 +1,11 @@
// Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved.
//
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//
// http://www.apache.org/licenses/LICENSE-2.0
//
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ -420,7 +420,7 @@ Snap.plugin(function (Snap, Element, Paper, glob) {
return box();
}
path = path2curve(path);
var x = 0,
var x = 0,
y = 0,
X = [],
Y = [],
@ -761,6 +761,9 @@ Snap.plugin(function (Snap, Element, Paper, glob) {
Y = x * math.sin(rad) + y * math.cos(rad);
return {x: X, y: Y};
});
if (!rx || !ry) {
return [x1, y1, x2, y2, x2, y2];
}
if (!recursive) {
xy = rotate(x1, y1, -rad);
x1 = xy.x;
@ -845,7 +848,7 @@ Snap.plugin(function (Snap, Element, Paper, glob) {
y: pow(t1, 3) * p1y + pow(t1, 2) * 3 * t * c1y + t1 * 3 * t * t * c2y + pow(t, 3) * p2y
};
}
// Returns bounding box of cubic bezier curve.
// Source: http://blog.hackers-cafe.net/2009/06/how-to-calculate-bezier-curves-bounding.html
// Original version: NISHIO Hirokazu