Fix for bbox for polyline, polygon
parent
79c172991c
commit
c7c36416c3
|
@ -274,7 +274,7 @@ See also <a href="#Element.removeData" class="dr-link">Element.removeData</a>
|
|||
<li><span class="dr-json-key">y2:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">y of the right side,</span>
|
||||
<li><span class="dr-json-key">y:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">y of the left side</span>
|
||||
</ol></li><li>}</li></ol>
|
||||
</div></section></article><article id="Element.getPointAtLength" class="Element-getPointAtLength-section"><header><h3 id="Element.getPointAtLength" class="dr-method">Element.getPointAtLength(length)<a href="#Element.getPointAtLength" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1119 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1119">➭</a></h3></header>
|
||||
</div></section></article><article id="Element.getPointAtLength" class="Element-getPointAtLength-section"><header><h3 id="Element.getPointAtLength" class="dr-method">Element.getPointAtLength(length)<a href="#Element.getPointAtLength" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1125 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1125">➭</a></h3></header>
|
||||
<section><div class="extra" id="Element.getPointAtLength-extra"></div><div class="dr-method"><p>Return coordinates of the point located at the given length on the given path. Only works for element of “path” type.
|
||||
</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">length</span>
|
||||
|
@ -286,7 +286,7 @@ See also <a href="#Element.removeData" class="dr-link">Element.removeData</a>
|
|||
<li><span class="dr-json-key">y:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">y coordinate</span>
|
||||
<li><span class="dr-json-key">alpha:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">angle of derivative</span>
|
||||
</ol></li><li>}</li></ol>
|
||||
</div></section></article><article id="Element.getSubpath" class="Element-getSubpath-section"><header><h3 id="Element.getSubpath" class="dr-method">Element.getSubpath(from, to)<a href="#Element.getSubpath" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1133 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1133">➭</a></h3></header>
|
||||
</div></section></article><article id="Element.getSubpath" class="Element-getSubpath-section"><header><h3 id="Element.getSubpath" class="dr-method">Element.getSubpath(from, to)<a href="#Element.getSubpath" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1139 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1139">➭</a></h3></header>
|
||||
<section><div class="extra" id="Element.getSubpath-extra"></div><div class="dr-method"><p>Return subpath of a given element from given length to given length. Only works for element of “path” type.
|
||||
</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">from</span>
|
||||
|
@ -297,7 +297,7 @@ See also <a href="#Element.removeData" class="dr-link">Element.removeData</a>
|
|||
<span class="dr-description">position of the end of the segment</span></li>
|
||||
</ol></div>
|
||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-string">string</em> <span class="dr-description">pathstring for the segment</span></p>
|
||||
</div></section></article><article id="Element.getTotalLength" class="Element-getTotalLength-section"><header><h3 id="Element.getTotalLength" class="dr-method">Element.getTotalLength()<a href="#Element.getTotalLength" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1099 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1099">➭</a></h3></header>
|
||||
</div></section></article><article id="Element.getTotalLength" class="Element-getTotalLength-section"><header><h3 id="Element.getTotalLength" class="dr-method">Element.getTotalLength()<a href="#Element.getTotalLength" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1105 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1105">➭</a></h3></header>
|
||||
<section><div class="extra" id="Element.getTotalLength-extra"></div><div class="dr-method"><p>Returns length of the path in pixels. Only works for element of “path” type.
|
||||
</p>
|
||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-number">number</em> <span class="dr-description">length.</span></p>
|
||||
|
@ -1576,7 +1576,7 @@ Parses given path string into an array of transformations.
|
|||
</ol></div>
|
||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-array">array</em> <span class="dr-description">array of transformations.</span></p>
|
||||
</div></section></article><article id="Snap.path" class="Snap-path-section"><header><h3 id="Snap.path" class="undefined">Snap.path<a href="#Snap.path" title="Link to this section" class="dr-hash">⚓</a></h3></header>
|
||||
<section><div class="extra" id="Snap.path-extra"></div></section></article><article id="Snap.path.bezierBBox" class="Snap-path-bezierBBox-section"><header><h4 id="Snap.path.bezierBBox" class="dr-method">Snap.path.bezierBBox(…)<a href="#Snap.path.bezierBBox" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1206 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1206">➭</a></h4></header>
|
||||
<section><div class="extra" id="Snap.path-extra"></div></section></article><article id="Snap.path.bezierBBox" class="Snap-path-bezierBBox-section"><header><h4 id="Snap.path.bezierBBox" class="dr-method">Snap.path.bezierBBox(…)<a href="#Snap.path.bezierBBox" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1212 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1212">➭</a></h4></header>
|
||||
<section><div class="extra" id="Snap.path.bezierBBox-extra"></div><div class="dr-method"><p>Utility method
|
||||
Return bounding box of a given cubic bezier curve
|
||||
</p>
|
||||
|
@ -1617,7 +1617,7 @@ Return bounding box of a given cubic bezier curve
|
|||
</ol></li><li> }</li><li> max: {<ol class="dr-json"><li><span class="dr-json-key">x:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">x coordinate of the right point</span>
|
||||
<li><span class="dr-json-key">y:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">y coordinate of the bottom point</span>
|
||||
</ol></li><li> }</li></ol></li><li>}</li></ol>
|
||||
</div></section></article><article id="Snap.path.findDotsAtSegment" class="Snap-path-findDotsAtSegment-section"><header><h4 id="Snap.path.findDotsAtSegment" 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">⚓</a><a class="dr-sourceline" title="Go to line 1176 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1176">➭</a></h4></header>
|
||||
</div></section></article><article id="Snap.path.findDotsAtSegment" class="Snap-path-findDotsAtSegment-section"><header><h4 id="Snap.path.findDotsAtSegment" 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">⚓</a><a class="dr-sourceline" title="Go to line 1182 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1182">➭</a></h4></header>
|
||||
<section><div class="extra" id="Snap.path.findDotsAtSegment-extra"></div><div class="dr-method"><p>Utility method
|
||||
Find dot coordinates on the given cubic bezier curve at the given t.
|
||||
</p>
|
||||
|
@ -1662,7 +1662,7 @@ Find dot coordinates on the given cubic bezier curve at the given t.
|
|||
<li><span class="dr-json-key">y:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">y coordinate of the end of the curve</span>
|
||||
</ol></li><li> }</li><li><span class="dr-json-key">alpha:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">angle of the curve derivative at the point</span>
|
||||
</ol></li><li>}</li></ol>
|
||||
</div></section></article><article id="Snap.path.getBBox" class="Snap-path-getBBox-section"><header><h4 id="Snap.path.getBBox" class="dr-method">Snap.path.getBBox(path)<a href="#Snap.path.getBBox" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1288 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1288">➭</a></h4></header>
|
||||
</div></section></article><article id="Snap.path.getBBox" class="Snap-path-getBBox-section"><header><h4 id="Snap.path.getBBox" class="dr-method">Snap.path.getBBox(path)<a href="#Snap.path.getBBox" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1294 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1294">➭</a></h4></header>
|
||||
<section><div class="extra" id="Snap.path.getBBox-extra"></div><div class="dr-method"><p>Utility method
|
||||
Return bounding box of a given path
|
||||
</p>
|
||||
|
@ -1678,7 +1678,7 @@ Return bounding box of a given path
|
|||
<li><span class="dr-json-key">width:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">width of the box</span>
|
||||
<li><span class="dr-json-key">height:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">height of the box</span>
|
||||
</ol></li><li>}</li></ol>
|
||||
</div></section></article><article id="Snap.path.getPointAtLength" class="Snap-path-getPointAtLength-section"><header><h4 id="Snap.path.getPointAtLength" class="dr-method">Snap.path.getPointAtLength(path, length)<a href="#Snap.path.getPointAtLength" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1072 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1072">➭</a></h4></header>
|
||||
</div></section></article><article id="Snap.path.getPointAtLength" class="Snap-path-getPointAtLength-section"><header><h4 id="Snap.path.getPointAtLength" class="dr-method">Snap.path.getPointAtLength(path, length)<a href="#Snap.path.getPointAtLength" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1078 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1078">➭</a></h4></header>
|
||||
<section><div class="extra" id="Snap.path.getPointAtLength-extra"></div><div class="dr-method"><p>Return coordinates of the point located at the given length on the given path.
|
||||
</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">path</span>
|
||||
|
@ -1693,7 +1693,7 @@ Return bounding box of a given path
|
|||
<li><span class="dr-json-key">y:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">y coordinate</span>
|
||||
<li><span class="dr-json-key">alpha:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">angle of derivative</span>
|
||||
</ol></li><li>}</li></ol>
|
||||
</div></section></article><article id="Snap.path.getSubpath" class="Snap-path-getSubpath-section"><header><h4 id="Snap.path.getSubpath" class="dr-method">Snap.path.getSubpath(path, from, to)<a href="#Snap.path.getSubpath" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1085 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1085">➭</a></h4></header>
|
||||
</div></section></article><article id="Snap.path.getSubpath" class="Snap-path-getSubpath-section"><header><h4 id="Snap.path.getSubpath" class="dr-method">Snap.path.getSubpath(path, from, to)<a href="#Snap.path.getSubpath" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1091 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1091">➭</a></h4></header>
|
||||
<section><div class="extra" id="Snap.path.getSubpath-extra"></div><div class="dr-method"><p>Return subpath of a given path from given length to given length.
|
||||
</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">path</span>
|
||||
|
@ -1707,7 +1707,7 @@ Return bounding box of a given path
|
|||
<span class="dr-description">position of the end of the segment</span></li>
|
||||
</ol></div>
|
||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-string">string</em> <span class="dr-description">pathstring for the segment</span></p>
|
||||
</div></section></article><article id="Snap.path.getTotalLength" class="Snap-path-getTotalLength-section"><header><h4 id="Snap.path.getTotalLength" class="dr-method">Snap.path.getTotalLength(path)<a href="#Snap.path.getTotalLength" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1055 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1055">➭</a></h4></header>
|
||||
</div></section></article><article id="Snap.path.getTotalLength" class="Snap-path-getTotalLength-section"><header><h4 id="Snap.path.getTotalLength" class="dr-method">Snap.path.getTotalLength(path)<a href="#Snap.path.getTotalLength" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1061 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1061">➭</a></h4></header>
|
||||
<section><div class="extra" id="Snap.path.getTotalLength-extra"></div><div class="dr-method"><p>Returns length of the given path in pixels.
|
||||
</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">path</span>
|
||||
|
@ -1715,7 +1715,7 @@ Return bounding box of a given path
|
|||
<span class="dr-description">SVG path string.</span></li>
|
||||
</ol></div>
|
||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-number">number</em> <span class="dr-description">length.</span></p>
|
||||
</div></section></article><article id="Snap.path.intersection" class="Snap-path-intersection-section"><header><h4 id="Snap.path.intersection" class="dr-method">Snap.path.intersection(path1, path2)<a href="#Snap.path.intersection" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1255 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1255">➭</a></h4></header>
|
||||
</div></section></article><article id="Snap.path.intersection" class="Snap-path-intersection-section"><header><h4 id="Snap.path.intersection" class="dr-method">Snap.path.intersection(path1, path2)<a href="#Snap.path.intersection" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1261 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1261">➭</a></h4></header>
|
||||
<section><div class="extra" id="Snap.path.intersection-extra"></div><div class="dr-method"><p>Utility method
|
||||
Finds intersections of two paths
|
||||
</p>
|
||||
|
@ -1736,7 +1736,7 @@ Finds intersections of two paths
|
|||
<li><span class="dr-json-key">bez1:</span><span class="dr-type"><em class="dr-type-array">array</em></span><span class="dr-json-description">eight coordinates representing beziér curve for the segment of path1</span>
|
||||
<li><span class="dr-json-key">bez2:</span><span class="dr-type"><em class="dr-type-array">array</em></span><span class="dr-json-description">eight coordinates representing beziér curve for the segment of path2</span>
|
||||
</ol></li><li> }</li><li>]</ol>
|
||||
</div></section></article><article id="Snap.path.isBBoxIntersect" class="Snap-path-isBBoxIntersect-section"><header><h4 id="Snap.path.isBBoxIntersect" class="dr-method">Snap.path.isBBoxIntersect(bbox1, bbox2)<a href="#Snap.path.isBBoxIntersect" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1231 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1231">➭</a></h4></header>
|
||||
</div></section></article><article id="Snap.path.isBBoxIntersect" class="Snap-path-isBBoxIntersect-section"><header><h4 id="Snap.path.isBBoxIntersect" class="dr-method">Snap.path.isBBoxIntersect(bbox1, bbox2)<a href="#Snap.path.isBBoxIntersect" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1237 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1237">➭</a></h4></header>
|
||||
<section><div class="extra" id="Snap.path.isBBoxIntersect-extra"></div><div class="dr-method"><p>Utility method
|
||||
Returns <code>true</code> if two bounding boxes intersect
|
||||
</p>
|
||||
|
@ -1748,7 +1748,7 @@ Returns <code>true</code> if two bounding boxes intersect
|
|||
<span class="dr-description">second bounding box</span></li>
|
||||
</ol></div>
|
||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-boolean">boolean</em> <span class="dr-description"><code>true</code> if they intersect</span></p>
|
||||
</div></section></article><article id="Snap.path.isPointInside" class="Snap-path-isPointInside-section"><header><h4 id="Snap.path.isPointInside" class="dr-method">Snap.path.isPointInside(path, x, y)<a href="#Snap.path.isPointInside" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1269 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1269">➭</a></h4></header>
|
||||
</div></section></article><article id="Snap.path.isPointInside" class="Snap-path-isPointInside-section"><header><h4 id="Snap.path.isPointInside" class="dr-method">Snap.path.isPointInside(path, x, y)<a href="#Snap.path.isPointInside" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1275 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1275">➭</a></h4></header>
|
||||
<section><div class="extra" id="Snap.path.isPointInside-extra"></div><div class="dr-method"><p>Utility method
|
||||
Returns <code>true</code> if given point is inside a given closed path.
|
||||
</p>
|
||||
|
@ -1763,7 +1763,7 @@ Returns <code>true</code> if given point is inside a given closed path.
|
|||
<span class="dr-description">y of the point</span></li>
|
||||
</ol></div>
|
||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-boolean">boolean</em> <span class="dr-description">true, if point is inside the path</span></p>
|
||||
</div></section></article><article id="Snap.path.isPointInsideBBox" class="Snap-path-isPointInsideBBox-section"><header><h4 id="Snap.path.isPointInsideBBox" class="dr-method">Snap.path.isPointInsideBBox(bbox, x, y)<a href="#Snap.path.isPointInsideBBox" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1219 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1219">➭</a></h4></header>
|
||||
</div></section></article><article id="Snap.path.isPointInsideBBox" class="Snap-path-isPointInsideBBox-section"><header><h4 id="Snap.path.isPointInsideBBox" class="dr-method">Snap.path.isPointInsideBBox(bbox, x, y)<a href="#Snap.path.isPointInsideBBox" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1225 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1225">➭</a></h4></header>
|
||||
<section><div class="extra" id="Snap.path.isPointInsideBBox-extra"></div><div class="dr-method"><p>Utility method
|
||||
Returns <code>true</code> if given point is inside bounding box.
|
||||
</p>
|
||||
|
@ -1778,7 +1778,7 @@ Returns <code>true</code> if given point is inside bounding box.
|
|||
<span class="dr-description">y coordinate of the point</span></li>
|
||||
</ol></div>
|
||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-boolean">boolean</em> <span class="dr-description"><code>true</code> if point inside</span></p>
|
||||
</div></section></article><article id="Snap.path.map" class="Snap-path-map-section"><header><h4 id="Snap.path.map" class="dr-method">Snap.path.map(path, matrix)<a href="#Snap.path.map" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1332 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1332">➭</a></h4></header>
|
||||
</div></section></article><article id="Snap.path.map" class="Snap-path-map-section"><header><h4 id="Snap.path.map" class="dr-method">Snap.path.map(path, matrix)<a href="#Snap.path.map" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1338 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1338">➭</a></h4></header>
|
||||
<section><div class="extra" id="Snap.path.map-extra"></div><div class="dr-method"><p>Transform the path string with given 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">path</span>
|
||||
|
@ -1789,7 +1789,7 @@ Returns <code>true</code> if given point is inside bounding box.
|
|||
<span class="dr-description">see <a href="#Matrix" class="dr-link">Matrix</a></span></li>
|
||||
</ol></div>
|
||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-string">string</em> <span class="dr-description">transformed path string</span></p>
|
||||
</div></section></article><article id="Snap.path.toAbsolute" class="Snap-path-toAbsolute-section"><header><h4 id="Snap.path.toAbsolute" class="dr-method">Snap.path.toAbsolute(path)<a href="#Snap.path.toAbsolute" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1311 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1311">➭</a></h4></header>
|
||||
</div></section></article><article id="Snap.path.toAbsolute" class="Snap-path-toAbsolute-section"><header><h4 id="Snap.path.toAbsolute" class="dr-method">Snap.path.toAbsolute(path)<a href="#Snap.path.toAbsolute" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1317 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1317">➭</a></h4></header>
|
||||
<section><div class="extra" id="Snap.path.toAbsolute-extra"></div><div class="dr-method"><p>Utility method
|
||||
Converts path coordinates into absolute values.
|
||||
</p>
|
||||
|
@ -1798,7 +1798,7 @@ Converts path coordinates into absolute values.
|
|||
<span class="dr-description">path string</span></li>
|
||||
</ol></div>
|
||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-array">array</em> <span class="dr-description">path string</span></p>
|
||||
</div></section></article><article id="Snap.path.toCubic" class="Snap-path-toCubic-section"><header><h4 id="Snap.path.toCubic" class="dr-method">Snap.path.toCubic(pathString)<a href="#Snap.path.toCubic" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1322 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1322">➭</a></h4></header>
|
||||
</div></section></article><article id="Snap.path.toCubic" class="Snap-path-toCubic-section"><header><h4 id="Snap.path.toCubic" class="dr-method">Snap.path.toCubic(pathString)<a href="#Snap.path.toCubic" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1328 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1328">➭</a></h4></header>
|
||||
<section><div class="extra" id="Snap.path.toCubic-extra"></div><div class="dr-method"><p>Utility method
|
||||
Converts path to a new path where all segments are cubic bezier curves.
|
||||
</p>
|
||||
|
@ -1807,7 +1807,7 @@ Converts path to a new path where all segments are cubic bezier curves.
|
|||
<span class="dr-description">path string or array of segments</span></li>
|
||||
</ol></div>
|
||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-array">array</em> <span class="dr-description">array of segments.</span></p>
|
||||
</div></section></article><article id="Snap.path.toRelative" class="Snap-path-toRelative-section"><header><h4 id="Snap.path.toRelative" class="dr-method">Snap.path.toRelative(path)<a href="#Snap.path.toRelative" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1300 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1300">➭</a></h4></header>
|
||||
</div></section></article><article id="Snap.path.toRelative" class="Snap-path-toRelative-section"><header><h4 id="Snap.path.toRelative" class="dr-method">Snap.path.toRelative(path)<a href="#Snap.path.toRelative" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1306 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1306">➭</a></h4></header>
|
||||
<section><div class="extra" id="Snap.path.toRelative-extra"></div><div class="dr-method"><p>Utility method
|
||||
Converts path coordinates into relative values.
|
||||
</p>
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -14,7 +14,7 @@
|
|||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
//
|
||||
// build: 2013-09-27
|
||||
// build: 2013-10-06
|
||||
// Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||
|
@ -5337,6 +5337,12 @@ Snap.plugin(function (Snap, Element, Paper, glob) {
|
|||
symbol: function (el) {
|
||||
var bbox = el.getBBox();
|
||||
return rectPath(bbox.x, bbox.y, bbox.width, bbox.height);
|
||||
},
|
||||
polyline: function (el) {
|
||||
return "M" + el.attr("points");
|
||||
},
|
||||
polygon: function (el) {
|
||||
return "M" + el.attr("points") + "z";
|
||||
}
|
||||
};
|
||||
function pathToRelative(pathArray) {
|
||||
|
|
|
@ -522,6 +522,12 @@ Snap.plugin(function (Snap, Element, Paper, glob) {
|
|||
symbol: function (el) {
|
||||
var bbox = el.getBBox();
|
||||
return rectPath(bbox.x, bbox.y, bbox.width, bbox.height);
|
||||
},
|
||||
polyline: function (el) {
|
||||
return "M" + el.attr("points");
|
||||
},
|
||||
polygon: function (el) {
|
||||
return "M" + el.attr("points") + "z";
|
||||
}
|
||||
};
|
||||
function pathToRelative(pathArray) {
|
||||
|
|
Loading…
Reference in New Issue