svgedit
Version:
Powerful SVG-Editor for your browser
4,806 lines (1,158 loc) • 271 kB
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>JSDoc: Module: path</title>
<script src="scripts/prettify/prettify.js"> </script>
<script src="scripts/prettify/lang-css.js"> </script>
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
<link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
</head>
<body>
<div id="main">
<h1 class="page-title">Module: path</h1>
<section>
<header>
</header>
<article>
<div class="container-overview">
<div class="description"><p>Path functionality.</p></div>
<dl class="details">
<dt class="tag-copyright">Copyright:</dt>
<dd class="tag-copyright"><ul class="dummy"><li>2011 Alexis Deveria, 2011 Jeff Schiller</li></ul></dd>
<dt class="tag-license">License:</dt>
<dd class="tag-license"><ul class="dummy"><li>MIT</li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="svgcanvas_path-actions.js.html">svgcanvas/path-actions.js</a>, <a href="svgcanvas_path-actions.js.html#line1">line 1</a>
</li></ul></dd>
</dl>
<dl class="details">
<dt class="tag-copyright">Copyright:</dt>
<dd class="tag-copyright"><ul class="dummy"><li>2011 Alexis Deveria, 2011 Jeff Schiller</li></ul></dd>
<dt class="tag-license">License:</dt>
<dd class="tag-license"><ul class="dummy"><li>MIT</li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="svgcanvas_path-method.js.html">svgcanvas/path-method.js</a>, <a href="svgcanvas_path-method.js.html#line1">line 1</a>
</li></ul></dd>
</dl>
<dl class="details">
<dt class="tag-copyright">Copyright:</dt>
<dd class="tag-copyright"><ul class="dummy"><li>2011 Alexis Deveria, 2011 Jeff Schiller</li></ul></dd>
<dt class="tag-license">License:</dt>
<dd class="tag-license"><ul class="dummy"><li>MIT</li></ul></dd>
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="svgcanvas_path.js.html">svgcanvas/path.js</a>, <a href="svgcanvas_path.js.html#line1">line 1</a>
</li></ul></dd>
</dl>
</div>
<h3 class="subsection-title">Classes</h3>
<dl>
<dt><a href="module-path.Path.html">Path</a></dt>
<dd></dd>
<dt><a href="module-path.Segment.html">Segment</a></dt>
<dd></dd>
</dl>
<h3 class="subsection-title">Interfaces</h3>
<dl>
<dt><a href="module-path.EditorContext.html">EditorContext</a></dt>
<dd></dd>
</dl>
<h3 class="subsection-title">Namespaces</h3>
<dl>
<dt><a href="module-path.html#.pathActions">pathActions</a></dt>
<dd></dd>
</dl>
<h3 class="subsection-title">Members</h3>
<h4 class="name" id=".path"><span class="type-signature">(static) </span>path<span class="type-signature"> :null|<a href="module-path.Path.html">module:path.Path</a></span></h4>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type">null</span>
|
<span class="param-type"><a href="module-path.Path.html">module:path.Path</a></span>
</li>
</ul>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="svgcanvas_path.js.html">svgcanvas/path.js</a>, <a href="svgcanvas_path.js.html#line71">line 71</a>
</li></ul></dd>
</dl>
<h4 class="name" id=".pathActions"><span class="type-signature">(static, constant) </span>pathActions<span class="type-signature"></span></h4>
<div class="description">
<p>Group: Path edit functions.
Functions relating to editing path elements.</p>
</div>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="svgcanvas_path.js.html">svgcanvas/path.js</a>, <a href="svgcanvas_path.js.html#line803">line 803</a>
</li></ul></dd>
</dl>
<h4 class="name" id=".pathMap"><span class="type-signature">(static) </span>pathMap<span class="type-signature"> :<a href="global.html#GenericArray">GenericArray</a></span></h4>
<div class="description">
<p>This is how we map paths to our preferred relative segment types.</p>
</div>
<h5>Type:</h5>
<ul>
<li>
<span class="param-type"><a href="global.html#GenericArray">GenericArray</a></span>
</li>
</ul>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="svgcanvas_path.js.html">svgcanvas/path.js</a>, <a href="svgcanvas_path.js.html#line581">line 581</a>
</li></ul></dd>
</dl>
<h3 class="subsection-title">Methods</h3>
<h4 class="name" id=".addCtrlGrip"><span class="type-signature">(static) </span>addCtrlGrip<span class="signature">(id)</span><span class="type-signature"> → {SVGCircleElement}</span></h4>
<div class="description">
<p>Requires prior call to <code>setUiStrings</code> if <code>xlink:title</code>
to be set on the grip.</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>id</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="svgcanvas_path-method.js.html">svgcanvas/path-method.js</a>, <a href="svgcanvas_path-method.js.html#line162">line 162</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">SVGCircleElement</span>
</dd>
</dl>
<h4 class="name" id=".addCtrlGrip"><span class="type-signature">(static) </span>addCtrlGrip<span class="signature">(id)</span><span class="type-signature"> → {SVGCircleElement}</span></h4>
<div class="description">
<p>Requires prior call to <code>setUiStrings</code> if <code>xlink:title</code>
to be set on the grip.</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>id</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="svgcanvas_path.js.html">svgcanvas/path.js</a>, <a href="svgcanvas_path.js.html#line305">line 305</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">SVGCircleElement</span>
</dd>
</dl>
<h4 class="name" id=".addPointGrip"><span class="type-signature">(static) </span>addPointGrip<span class="signature">(index, x, y)</span><span class="type-signature"> → {SVGCircleElement}</span></h4>
<div class="description">
<p>Requires prior call to <code>setUiStrings</code> if <code>xlink:title</code>
to be set on the grip.</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>index</code></td>
<td class="type">
<span class="param-type"><a href="global.html#Integer">Integer</a></span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>x</code></td>
<td class="type">
<span class="param-type"><a href="global.html#Integer">Integer</a></span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>y</code></td>
<td class="type">
<span class="param-type"><a href="global.html#Integer">Integer</a></span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="svgcanvas_path-method.js.html">svgcanvas/path-method.js</a>, <a href="svgcanvas_path-method.js.html#line110">line 110</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">SVGCircleElement</span>
</dd>
</dl>
<h4 class="name" id=".addPointGrip"><span class="type-signature">(static) </span>addPointGrip<span class="signature">(index, x, y)</span><span class="type-signature"> → {SVGCircleElement}</span></h4>
<div class="description">
<p>Requires prior call to <code>setUiStrings</code> if <code>xlink:title</code>
to be set on the grip.</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>index</code></td>
<td class="type">
<span class="param-type"><a href="global.html#Integer">Integer</a></span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>x</code></td>
<td class="type">
<span class="param-type"><a href="global.html#Integer">Integer</a></span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>y</code></td>
<td class="type">
<span class="param-type"><a href="global.html#Integer">Integer</a></span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="svgcanvas_path.js.html">svgcanvas/path.js</a>, <a href="svgcanvas_path.js.html#line288">line 288</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">SVGCircleElement</span>
</dd>
</dl>
<h4 class="name" id=".clearData"><span class="type-signature">(static) </span>clearData<span class="signature">()</span><span class="type-signature"> → {void}</span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="svgcanvas_path.js.html">svgcanvas/path.js</a>, <a href="svgcanvas_path.js.html#line523">line 523</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">void</span>
</dd>
</dl>
<h4 class="name" id=".convertPath"><span class="type-signature">(static) </span>convertPath<span class="signature">(pth, toRel)</span><span class="type-signature"> → {string}</span></h4>
<div class="description">
<p>Convert a path to one with only absolute or relative values.</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>pth</code></td>
<td class="type">
<span class="param-type">SVGPathElement</span>
</td>
<td class="description last"><p>the path to convert</p></td>
</tr>
<tr>
<td class="name"><code>toRel</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="description last"><p>true of convert to relative</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="svgcanvas_path-actions.js.html">svgcanvas/path-actions.js</a>, <a href="svgcanvas_path-actions.js.html#line36">line 36</a>
</li></ul></dd>
<dt class="tag-todo">To Do:</dt>
<dd class="tag-todo">
<ul>
<li>move to pathActions.js</li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">string</span>
</dd>
</dl>
<h4 class="name" id=".convertPath"><span class="type-signature">(static) </span>convertPath<span class="signature">(pth, toRel)</span><span class="type-signature"> → {string}</span></h4>
<div class="description">
<p>Convert a path to one with only absolute or relative values.</p>
</div>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>pth</code></td>
<td class="type">
<span class="param-type">SVGPathElement</span>
</td>
<td class="description last"><p>the path to convert</p></td>
</tr>
<tr>
<td class="name"><code>toRel</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="description last"><p>true of convert to relative</p></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="svgcanvas_path.js.html">svgcanvas/path.js</a>, <a href="svgcanvas_path.js.html#line591">line 591</a>
</li></ul></dd>
<dt class="tag-todo">To Do:</dt>
<dd class="tag-todo">
<ul>
<li>move to pathActions.js</li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">string</span>
</dd>
</dl>
<h4 class="name" id=".getControlPoints"><span class="type-signature">(static) </span>getControlPoints<span class="signature">(seg)</span><span class="type-signature"> → {<a href="global.html#PlainObject">PlainObject</a>.<string, (SVGLineElement|SVGCircleElement)>}</span></h4>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>seg</code></td>
<td class="type">
<span class="param-type">Segment</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="svgcanvas_path-method.js.html">svgcanvas/path-method.js</a>, <a href="svgcanvas_path-method.js.html#line232">line 232</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="global.html#PlainObject">PlainObject</a>.<string, (SVGLineElement|SVGCircleElement)></span>
</dd>
</dl>
<h4 class="name" id=".getControlPoints"><span class="type-signature">(static) </span>getControlPoints<span class="signature">(seg)</span><span class="type-signature"> → {<a href="global.html#PlainObject">PlainObject</a>.<string, (SVGLineElement|SVGCircleElement)>}</span></h4>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>seg</code></td>
<td class="type">
<span class="param-type">Segment</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="svgcanvas_path.js.html">svgcanvas/path.js</a>, <a href="svgcanvas_path.js.html#line329">line 329</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="global.html#PlainObject">PlainObject</a>.<string, (SVGLineElement|SVGCircleElement)></span>
</dd>
</dl>
<h4 class="name" id=".getCtrlLine"><span class="type-signature">(static) </span>getCtrlLine<span class="signature">(id)</span><span class="type-signature"> → {SVGLineElement}</span></h4>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>id</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="svgcanvas_path-method.js.html">svgcanvas/path-method.js</a>, <a href="svgcanvas_path-method.js.html#line192">line 192</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">SVGLineElement</span>
</dd>
</dl>
<h4 class="name" id=".getCtrlLine"><span class="type-signature">(static) </span>getCtrlLine<span class="signature">(id)</span><span class="type-signature"> → {SVGLineElement}</span></h4>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>id</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="svgcanvas_path.js.html">svgcanvas/path.js</a>, <a href="svgcanvas_path.js.html#line314">line 314</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">SVGLineElement</span>
</dd>
</dl>
<h4 class="name" id=".getGripContainer"><span class="type-signature">(static) </span>getGripContainer<span class="signature">()</span><span class="type-signature"> → {Element}</span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="svgcanvas_path-method.js.html">svgcanvas/path-method.js</a>, <a href="svgcanvas_path-method.js.html#line96">line 96</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Element</span>
</dd>
</dl>
<h4 class="name" id=".getGripContainer"><span class="type-signature">(static) </span>getGripContainer<span class="signature">()</span><span class="type-signature"> → {Element}</span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="svgcanvas_path.js.html">svgcanvas/path.js</a>, <a href="svgcanvas_path.js.html#line299">line 299</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">Element</span>
</dd>
</dl>
<h4 class="name" id=".getGripPt"><span class="type-signature">(static) </span>getGripPt<span class="signature">(seg, altPt)</span><span class="type-signature"> → {<a href="module-math.html#.XYObject">module:math.XYObject</a>}</span></h4>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>seg</code></td>
<td class="type">
<span class="param-type">Segment</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>altPt</code></td>
<td class="type">
<span class="param-type"><a href="module-math.html#.XYObject">module:math.XYObject</a></span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="svgcanvas_path-method.js.html">svgcanvas/path-method.js</a>, <a href="svgcanvas_path-method.js.html#line48">line 48</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="module-math.html#.XYObject">module:math.XYObject</a></span>
</dd>
</dl>
<h4 class="name" id=".getGripPt"><span class="type-signature">(static) </span>getGripPt<span class="signature">(seg, altPt)</span><span class="type-signature"> → {<a href="module-math.html#.XYObject">module:math.XYObject</a>}</span></h4>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>seg</code></td>
<td class="type">
<span class="param-type">Segment</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>altPt</code></td>
<td class="type">
<span class="param-type"><a href="module-math.html#.XYObject">module:math.XYObject</a></span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="svgcanvas_path.js.html">svgcanvas/path.js</a>, <a href="svgcanvas_path.js.html#line272">line 272</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="module-math.html#.XYObject">module:math.XYObject</a></span>
</dd>
</dl>
<h4 class="name" id=".getPath_"><span class="type-signature">(static) </span>getPath_<span class="signature">(elem)</span><span class="type-signature"> → {<a href="module-path.Path.html">module:path.Path</a>}</span></h4>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>elem</code></td>
<td class="type">
<span class="param-type">SVGPathElement</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="svgcanvas_path.js.html">svgcanvas/path.js</a>, <a href="svgcanvas_path.js.html#line410">line 410</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="module-path.Path.html">module:path.Path</a></span>
</dd>
</dl>
<h4 class="name" id=".getPointFromGrip"><span class="type-signature">(static) </span>getPointFromGrip<span class="signature">(pt, pth)</span><span class="type-signature"> → {<a href="module-math.html#.XYObject">module:math.XYObject</a>}</span></h4>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>pt</code></td>
<td class="type">
<span class="param-type"><a href="module-math.html#.XYObject">module:math.XYObject</a></span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>pth</code></td>
<td class="type">
<span class="param-type"><a href="module-path.Path.html">module:path.Path</a></span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="svgcanvas_path-method.js.html">svgcanvas/path-method.js</a>, <a href="svgcanvas_path-method.js.html#line72">line 72</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="module-math.html#.XYObject">module:math.XYObject</a></span>
</dd>
</dl>
<h4 class="name" id=".getPointFromGrip"><span class="type-signature">(static) </span>getPointFromGrip<span class="signature">(pt, pth)</span><span class="type-signature"> → {<a href="module-math.html#.XYObject">module:math.XYObject</a>}</span></h4>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>pt</code></td>
<td class="type">
<span class="param-type"><a href="module-math.html#.XYObject">module:math.XYObject</a></span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>pth</code></td>
<td class="type">
<span class="param-type"><a href="module-path.Path.html">module:path.Path</a></span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="svgcanvas_path.js.html">svgcanvas/path.js</a>, <a href="svgcanvas_path.js.html#line280">line 280</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="module-math.html#.XYObject">module:math.XYObject</a></span>
</dd>
</dl>
<h4 class="name" id=".getPointGrip"><span class="type-signature">(static) </span>getPointGrip<span class="signature">(seg, update)</span><span class="type-signature"> → {SVGCircleElement}</span></h4>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>seg</code></td>
<td class="type">
<span class="param-type">Segment</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>update</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="svgcanvas_path-method.js.html">svgcanvas/path-method.js</a>, <a href="svgcanvas_path-method.js.html#line211">line 211</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">SVGCircleElement</span>
</dd>
</dl>
<h4 class="name" id=".getPointGrip"><span class="type-signature">(static) </span>getPointGrip<span class="signature">(seg, update)</span><span class="type-signature"> → {SVGCircleElement}</span></h4>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>seg</code></td>
<td class="type">
<span class="param-type">Segment</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>update</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="svgcanvas_path.js.html">svgcanvas/path.js</a>, <a href="svgcanvas_path.js.html#line321">line 321</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">SVGCircleElement</span>
</dd>
</dl>
<h4 class="name" id=".getSegSelector"><span class="type-signature">(static) </span>getSegSelector<span class="signature">(seg, update)</span><span class="type-signature"> → {SVGPathElement}</span></h4>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>seg</code></td>
<td class="type">
<span class="param-type">Segment</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>update</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="svgcanvas_path-method.js.html">svgcanvas/path-method.js</a>, <a href="svgcanvas_path-method.js.html#line297">line 297</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">SVGPathElement</span>
</dd>
</dl>
<h4 class="name" id=".getSegSelector"><span class="type-signature">(static) </span>getSegSelector<span class="signature">(seg, update)</span><span class="type-signature"> → {SVGPathElement}</span></h4>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>seg</code></td>
<td class="type">
<span class="param-type">Segment</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>update</code></td>
<td class="type">
<span class="param-type">boolean</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="svgcanvas_path.js.html">svgcanvas/path.js</a>, <a href="svgcanvas_path.js.html#line347">line 347</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">SVGPathElement</span>
</dd>
</dl>
<h4 class="name" id=".init"><span class="type-signature">(static) </span>init<span class="signature">(editorContext)</span><span class="type-signature"> → {void}</span></h4>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>editorContext</code></td>
<td class="type">
<span class="param-type"><a href="module-path.EditorContext.html">module:path.EditorContext</a></span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="svgcanvas_path.js.html">svgcanvas/path.js</a>, <a href="svgcanvas_path.js.html#line227">line 227</a>
</li></ul></dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">void</span>
</dd>
</dl>
<h4 class="name" id=".ptObjToArr"><span class="type-signature">(static) </span>ptObjToArr<span class="signature">(type, segItem)</span><span class="type-signature"> → {<a href="global.html#ArgumentsArray">ArgumentsArray</a>}</span></h4>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>type</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>segItem</code></td>
<td class="type">
<span class="param-type">SVGPathSegMovetoAbs</span>
|
<span class="param-type">SVGPathSegLinetoAbs</span>
|
<span class="param-type">SVGPathSegCurvetoCubicAbs</span>
|
<span class="param-type">SVGPathSegCurvetoQuadraticAbs</span>
|
<span class="param-type">SVGPathSegArcAbs</span>
|
<span class="param-type">SVGPathSegLinetoHorizontalAbs</span>
|
<span class="param-type">SVGPathSegLinetoVerticalAbs</span>
|
<span class="param-type">SVGPathSegCurvetoCubicSmoothAbs</span>
|
<span class="param-type">SVGPathSegCurvetoQuadraticSmoothAbs</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="svgcanvas_path-method.js.html">svgcanvas/path-method.js</a>, <a href="svgcanvas_path-method.js.html#line32">line 32</a>
</li></ul></dd>
<dt class="tag-todo">To Do:</dt>
<dd class="tag-todo">
<ul>
<li>See if this should just live in `replacePathSeg`</li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="global.html#ArgumentsArray">ArgumentsArray</a></span>
</dd>
</dl>
<h4 class="name" id=".ptObjToArr"><span class="type-signature">(static) </span>ptObjToArr<span class="signature">(type, segItem)</span><span class="type-signature"> → {<a href="global.html#ArgumentsArray">ArgumentsArray</a>}</span></h4>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>type</code></td>
<td class="type">
<span class="param-type">string</span>
</td>
<td class="description last"></td>
</tr>
<tr>
<td class="name"><code>segItem</code></td>
<td class="type">
<span class="param-type">SVGPathSegMovetoAbs</span>
|
<span class="param-type">SVGPathSegLinetoAbs</span>
|
<span class="param-type">SVGPathSegCurvetoCubicAbs</span>
|
<span class="param-type">SVGPathSegCurvetoQuadraticAbs</span>
|
<span class="param-type">SVGPathSegArcAbs</span>
|
<span class="param-type">SVGPathSegLinetoHorizontalAbs</span>
|
<span class="param-type">SVGPathSegLinetoVerticalAbs</span>
|
<span class="param-type">SVGPathSegCurvetoCubicSmoothAbs</span>
|
<span class="param-type">SVGPathSegCurvetoQuadraticSmoothAbs</span>
</td>
<td class="description last"></td>
</tr>
</tbody>
</table>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="svgcanvas_path.js.html">svgcanvas/path.js</a>, <a href="svgcanvas_path.js.html#line262">line 262</a>
</li></ul></dd>
<dt class="tag-todo">To Do:</dt>
<dd class="tag-todo">
<ul>
<li>See if this should just live in `replacePathSeg`</li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type"><a href="global.html#ArgumentsArray">ArgumentsArray</a></span>
</dd>
</dl>
<h4 class="name" id=".recalcRotatedPath"><span class="type-signature">(static) </span>recalcRotatedPath<span class="signature">()</span><span class="type-signature"> → {void}</span></h4>
<dl class="details">
<dt class="tag-source">Source:</dt>
<dd class="tag-source"><ul class="dummy"><li>
<a href="svgcanvas_path.js.html">svgcanvas/path.js</a>, <a href="svgcanvas_path.js.html#line463">line 463</a>
</li></ul></dd>
<dt class="tag-todo">To Do:</dt>
<dd class="tag-todo">
<ul>
<li>This is still using ye olde transform methods, can probably
be optimized or even taken care of by `recalculateDimensions`</li>
</ul>
</dd>
</dl>
<h5>Returns:</h5>
<dl>
<dt>
Type
</dt>
<dd>
<span class="param-type">void</span>
</dd>
</dl>
<h4 class="name" id=".removePath_"><span class="type-signature">(static) </span>removePath_<span class="signature">(id)</span><span class="type-signature"> → {void}</span></h4>
<h5>Parameters:</h5>
<table class="params">
<thead>
<tr>
<th>Name</th>
<th>Type</th>
<th class="last">Description</th>
</tr>
</thead>
<tbody>
<tr>
<td class="name"><code>id</code></td>