UNPKG

svgedit

Version:

Powerful SVG-Editor for your browser

4,233 lines (1,115 loc) 244 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>JSDoc: Module: svgcanvas</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: svgcanvas</h1> <section> <header> </header> <article> <div class="container-overview"> <div class="description"><p>Tools for SVG handle on JSON format.</p></div> <dl class="details"> <dt class="tag-copyright">Copyright:</dt> <dd class="tag-copyright"><ul class="dummy"><li>2010 Alexis Deveria, 2010 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_json.js.html">svgcanvas/json.js</a>, <a href="svgcanvas_json.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>2010 Alexis Deveria, 2010 Pavol Rusnak, 2010 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_svgcanvas.js.html">svgcanvas/svgcanvas.js</a>, <a href="svgcanvas_svgcanvas.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>2010 Alexis Deveria, 2010 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_svgroot.js.html">svgcanvas/svgroot.js</a>, <a href="svgcanvas_svgroot.js.html#line1">line 1</a> </li></ul></dd> </dl> </div> <h3 class="subsection-title">Classes</h3> <dl> <dt><a href="module-svgcanvas.SvgCanvas.html">SvgCanvas</a></dt> <dd></dd> </dl> <h3 class="subsection-title">Interfaces</h3> <dl> <dt><a href="module-svgcanvas.PrivateMethods.html">PrivateMethods</a></dt> <dd></dd> </dl> <h3 class="subsection-title">Members</h3> <h4 class="name" id="~addCommandToHistory"><span class="type-signature">(inner) </span>addCommandToHistory<span class="type-signature"> :<a href="module-path.EditorContext.html#addCommandToHistory">module:path.EditorContext#addCommandToHistory</a>|<a href="module-draw.DrawCanvasInit.html#addCommandToHistory">module:draw.DrawCanvasInit#addCommandToHistory</a></span></h4> <div class="description"> <p>This should really be an intersection applying to all types rather than a union.</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type"><a href="module-path.EditorContext.html#addCommandToHistory">module:path.EditorContext#addCommandToHistory</a></span> | <span class="param-type"><a href="module-draw.DrawCanvasInit.html#addCommandToHistory">module:draw.DrawCanvasInit#addCommandToHistory</a></span> </li> </ul> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="svgcanvas_svgcanvas.js.html">svgcanvas/svgcanvas.js</a>, <a href="svgcanvas_svgcanvas.js.html#line603">line 603</a> </li></ul></dd> </dl> <h4 class="name" id="~svgcontent"><span class="type-signature">(inner) </span>svgcontent<span class="type-signature"> :SVGSVGElement</span></h4> <div class="description"> <p>The actual element that represents the final output SVG element.</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">SVGSVGElement</span> </li> </ul> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="svgcanvas_svgcanvas.js.html">svgcanvas/svgcanvas.js</a>, <a href="svgcanvas_svgcanvas.js.html#line236">line 236</a> </li></ul></dd> </dl> <h4 class="name" id="~svgroot"><span class="type-signature">(inner) </span>svgroot<span class="type-signature"> :SVGSVGElement</span></h4> <h5>Type:</h5> <ul> <li> <span class="param-type">SVGSVGElement</span> </li> </ul> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="svgcanvas_svgcanvas.js.html">svgcanvas/svgcanvas.js</a>, <a href="svgcanvas_svgcanvas.js.html#line228">line 228</a> </li></ul></dd> </dl> <h3 class="subsection-title">Methods</h3> <h4 class="name" id=".svgRootElementsvgRootElementthesvgnodeanditschildren."><span class="type-signature">(static) </span>svgRootElement svgRootElement the svg node and its children.<span class="signature">(svgdoc, dimensions)</span><span class="type-signature"> &rarr; {svgRootElement}</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>svgdoc</code></td> <td class="type"> <span class="param-type">Element</span> </td> <td class="description last"><p>window.document</p></td> </tr> <tr> <td class="name"><code>dimensions</code></td> <td class="type"> <span class="param-type"><a href="global.html#ArgumentsArray">ArgumentsArray</a></span> </td> <td class="description last"><p>dimensions of width and height</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_svgroot.js.html">svgcanvas/svgroot.js</a>, <a href="svgcanvas_svgroot.js.html#line11">line 11</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">svgRootElement</span> </dd> </dl> <h4 class="name" id="~addPtsToSelection"><span class="type-signature">(inner) </span>addPtsToSelection<span class="signature">(ptsInfo)</span><span class="type-signature"> &rarr; {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>ptsInfo</code></td> <td class="type"> <span class="param-type"><a href="global.html#PlainObject">PlainObject</a></span> </td> <td class="description last"> <h6>Properties</h6> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>closedSubpath</code></td> <td class="type"> <span class="param-type">boolean</span> </td> <td class="description last"></td> </tr> <tr> <td class="name"><code>grips</code></td> <td class="type"> <span class="param-type">Array.&lt;SVGCircleElement></span> </td> <td class="description last"></td> </tr> </tbody> </table> </td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="svgcanvas_svgcanvas.js.html">svgcanvas/svgcanvas.js</a>, <a href="svgcanvas_svgcanvas.js.html#line709">line 709</a> </li></ul></dd> </dl> <h5>Fires:</h5> <ul> <li><a href="module-svgcanvas.SvgCanvas.html#event:event:pointsAdded">module:svgcanvas.SvgCanvas#event:pointsAdded</a></li> <li><a href="module-svgcanvas.SvgCanvas.html#event:event:selected">module:svgcanvas.SvgCanvas#event:selected</a></li> </ul> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">void</span> </dd> </dl> <h4 class="name" id="~changeSVGContent"><span class="type-signature">(inner) </span>changeSVGContent<span class="signature">()</span><span class="type-signature"> &rarr; {void}</span></h4> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="svgcanvas_svgcanvas.js.html">svgcanvas/svgcanvas.js</a>, <a href="svgcanvas_svgcanvas.js.html#line1629">line 1629</a> </li></ul></dd> </dl> <h5>Fires:</h5> <ul> <li><a href="module-svgcanvas.SvgCanvas.html#event:event:changed">module:svgcanvas.SvgCanvas#event:changed</a></li> </ul> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">void</span> </dd> </dl> <h4 class="name" id="~endChanges"><span class="type-signature">(inner) </span>endChanges<span class="signature">(changes)</span><span class="type-signature"> &rarr; {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>changes</code></td> <td class="type"> <span class="param-type"><a href="global.html#PlainObject">PlainObject</a></span> </td> <td class="description last"> <h6>Properties</h6> <table class="params"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>cmd</code></td> <td class="type"> <span class="param-type">ChangeElementCommand</span> </td> <td class="description last"></td> </tr> <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> </td> </tr> </tbody> </table> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="svgcanvas_svgcanvas.js.html">svgcanvas/svgcanvas.js</a>, <a href="svgcanvas_svgcanvas.js.html#line723">line 723</a> </li></ul></dd> </dl> <h5>Fires:</h5> <ul> <li><a href="module-svgcanvas.SvgCanvas.html#event:event:changed">module:svgcanvas.SvgCanvas#event:changed</a></li> </ul> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">void</span> </dd> </dl> <h4 class="name" id="~ffClone"><span class="type-signature">(inner) </span>ffClone<span class="signature">(elem)</span><span class="type-signature"> &rarr; {Element}</span></h4> <div class="description"> <p>Hack for Firefox bugs where text element features aren't updated or get messed up. See issue 136 and issue 137. This function clones the element and re-selects it.</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>elem</code></td> <td class="type"> <span class="param-type">Element</span> </td> <td class="description last"><p>The (text) DOM element to clone</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_undo.js.html">svgcanvas/undo.js</a>, <a href="svgcanvas_undo.js.html#line108">line 108</a> </li></ul></dd> <dt class="tag-todo">To Do:</dt> <dd class="tag-todo"> <ul> <li>Test for this bug on load and add it to "support" object instead of browser sniffing</li> </ul> </dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>Cloned element</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type">Element</span> </dd> </dl> <h4 class="name" id="~findDuplicateGradient"><span class="type-signature">(inner) </span>findDuplicateGradient<span class="signature">(grad)</span><span class="type-signature"> &rarr; {SVGGradientElement}</span></h4> <div class="description"> <p>Check if exact gradient already exists.</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>grad</code></td> <td class="type"> <span class="param-type">SVGGradientElement</span> </td> <td class="description last"><p>The gradient DOM element to compare to others</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_elem-get-set.js.html">svgcanvas/elem-get-set.js</a>, <a href="svgcanvas_elem-get-set.js.html#line391">line 391</a> </li></ul></dd> </dl> <h5>Returns:</h5> <div class="param-desc"> <p>The existing gradient if found, <code>null</code> if not</p> </div> <dl> <dt> Type </dt> <dd> <span class="param-type">SVGGradientElement</span> </dd> </dl> <h4 class="name" id="~logMatrix"><span class="type-signature">(inner) </span>logMatrix<span class="signature">(m)</span><span class="type-signature"> &rarr; {void}</span></h4> <div class="description"> <p>Debug tool to easily see the current matrix in the browser's console.</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>m</code></td> <td class="type"> <span class="param-type">SVGMatrix</span> </td> <td class="description last"><p>The matrix</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_svgcanvas.js.html">svgcanvas/svgcanvas.js</a>, <a href="svgcanvas_svgcanvas.js.html#line1075">line 1075</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">void</span> </dd> </dl> <h3 class="subsection-title">Type Definitions</h3> <h4 class="name" id=".CanvasInfo">CanvasInfo</h4> <h5>Type:</h5> <ul> <li> <span class="param-type"><a href="global.html#PlainObject">PlainObject</a></span> </li> </ul> <h5 class="subsection-title">Properties:</h5> <table class="props"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>x</code></td> <td class="type"> <span class="param-type"><a href="global.html#Float">Float</a></span> </td> <td class="description last"><p>The canvas' new x coordinate</p></td> </tr> <tr> <td class="name"><code>y</code></td> <td class="type"> <span class="param-type"><a href="global.html#Float">Float</a></span> </td> <td class="description last"><p>The canvas' new y coordinate</p></td> </tr> <tr> <td class="name"><code>oldX</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>The canvas' old x coordinate</p></td> </tr> <tr> <td class="name"><code>oldY</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>The canvas' old y coordinate</p></td> </tr> <tr> <td class="name"><code>d_x</code></td> <td class="type"> <span class="param-type"><a href="global.html#Float">Float</a></span> </td> <td class="description last"><p>The x position difference</p></td> </tr> <tr> <td class="name"><code>d_y</code></td> <td class="type"> <span class="param-type"><a href="global.html#Float">Float</a></span> </td> <td class="description last"><p>The y position difference</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_svgcanvas.js.html">svgcanvas/svgcanvas.js</a>, <a href="svgcanvas_svgcanvas.js.html#line2639">line 2639</a> </li></ul></dd> </dl> <h4 class="name" id=".ChangedIDs">ChangedIDs</h4> <h5>Type:</h5> <ul> <li> <span class="param-type"><a href="global.html#PlainObject">PlainObject</a>.&lt;string, string></span> </li> </ul> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="svgcanvas_paste-elem.js.html">svgcanvas/paste-elem.js</a>, <a href="svgcanvas_paste-elem.js.html#line39">line 39</a> </li></ul></dd> </dl> <h4 class="name" id=".ElementPositionInCanvas">ElementPositionInCanvas</h4> <h5>Type:</h5> <ul> <li> <span class="param-type"><a href="module-jQueryAttr.html#.Attributes">module:jQueryAttr.Attributes</a></span> </li> </ul> <h5 class="subsection-title">Properties:</h5> <table class="props"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>x</code></td> <td class="type"> <span class="param-type"><a href="global.html#Float">Float</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#Float">Float</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_svgcanvas.js.html">svgcanvas/svgcanvas.js</a>, <a href="svgcanvas_svgcanvas.js.html#line1812">line 1812</a> </li></ul></dd> </dl> <h4 class="name" id=".EventHandler"><span class="type-signature"></span>EventHandler<span class="signature">(win, arg)</span><span class="type-signature"> &rarr; {<a href="module-svgcanvas.html#.EventHandlerReturn">module:svgcanvas.EventHandlerReturn</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>win</code></td> <td class="type"> <span class="param-type"><a href="external-Window.html">external:Window</a></span> </td> <td class="description last"></td> </tr> <tr> <td class="name"><code>arg</code></td> <td class="type"> <span class="param-type"><a href="module-svgcanvas.SvgCanvas.html#event:event:GenericCanvasEvent">module:svgcanvas.SvgCanvas#event:GenericCanvasEvent</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_svgcanvas.js.html">svgcanvas/svgcanvas.js</a>, <a href="svgcanvas_svgcanvas.js.html#line1025">line 1025</a> </li></ul></dd> </dl> <h5>Listens to Events:</h5> <ul> <li><a href="module-svgcanvas.SvgCanvas.html#event:event:GenericCanvasEvent">module:svgcanvas.SvgCanvas#event:GenericCanvasEvent</a></li> </ul> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="module-svgcanvas.html#.EventHandlerReturn">module:svgcanvas.EventHandlerReturn</a></span> </dd> </dl> <h4 class="name" id=".EventHandlerReturn">EventHandlerReturn</h4> <div class="description"> <p>The promise return, if present, resolves to <code>undefined</code> (<code>extension_added</code>, <code>exported</code>, <code>saved</code>).</p> </div> <h5>Type:</h5> <ul> <li> <span class="param-type">Promise.&lt;void></span> | <span class="param-type">void</span> </li> </ul> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="svgcanvas_svgcanvas.js.html">svgcanvas/svgcanvas.js</a>, <a href="svgcanvas_svgcanvas.js.html#line1019">line 1019</a> </li></ul></dd> </dl> <h4 class="name" id=".ExtensionArgumentObject">ExtensionArgumentObject</h4> <h5>Type:</h5> <ul> <li> <span class="param-type"><a href="module-svgcanvas.PrivateMethods.html">module:svgcanvas.PrivateMethods</a></span> </li> </ul> <h5 class="subsection-title">Properties:</h5> <table class="props"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>svgroot</code></td> <td class="type"> <span class="param-type">SVGSVGElement</span> </td> <td class="description last"><p>See <a href="module-svgcanvas.html#~svgroot"><code>module:svgcanvas~svgroot</code></a></p></td> </tr> <tr> <td class="name"><code>svgcontent</code></td> <td class="type"> <span class="param-type">SVGSVGElement</span> </td> <td class="description last"><p>See <a href="module-svgcanvas.html#~svgcontent"><code>module:svgcanvas~svgcontent</code></a></p></td> </tr> <tr> <td class="name"><code>nonce</code></td> <td class="type"> <span class="param-type">string</span> | <span class="param-type"><a href="global.html#Integer">Integer</a></span> </td> <td class="description last"><p>See <a href="module-draw.Drawing.html#getNonce"><code>module:draw.Drawing#getNonce</code></a></p></td> </tr> <tr> <td class="name"><code>selectorManager</code></td> <td class="type"> <span class="param-type"><a href="module-select.SelectorManager.html">module:select.SelectorManager</a></span> </td> <td class="description last"></td> </tr> <tr> <td class="name"><code>importLocale</code></td> <td class="type"> <span class="param-type">module:SVGEditor~ImportLocale</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_svgcanvas.js.html">svgcanvas/svgcanvas.js</a>, <a href="svgcanvas_svgcanvas.js.html#line852">line 852</a> </li></ul></dd> </dl> <h4 class="name" id=".ExtensionInitResponsePlusName">ExtensionInitResponsePlusName</h4> <h5>Type:</h5> <ul> <li> <span class="param-type"><a href="global.html#PlainObject">PlainObject</a></span> </li> </ul> <h5 class="subsection-title">Properties:</h5> <table class="props"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>name</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>The extension's resolved ID (whether explicit or based on file name)</p></td> </tr> </tbody> </table> <dl class="details"> <dt class="implements">Implements:</dt> <dd class="implements"><ul> <li>module:svgcanvas.ExtensionInitResponse</li> </ul></dd> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="svgcanvas_svgcanvas.js.html">svgcanvas/svgcanvas.js</a>, <a href="svgcanvas_svgcanvas.js.html#line955">line 955</a> </li></ul></dd> </dl> <h4 class="name" id=".ExtensionNameFilter"><span class="type-signature"></span>ExtensionNameFilter<span class="signature">(name)</span><span class="type-signature"> &rarr; {boolean}</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>name</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_selection.js.html">svgcanvas/selection.js</a>, <a href="svgcanvas_selection.js.html#line179">line 179</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type">boolean</span> </dd> </dl> <h4 class="name" id=".ExtensionStatus">ExtensionStatus</h4> <h5>Type:</h5> <ul> <li> <span class="param-type">module:svgcanvas.ExtensionMouseDownStatus</span> | <span class="param-type">module:svgcanvas.ExtensionMouseUpStatus</span> | <span class="param-type">module:svgcanvas.ExtensionIDsUpdatedStatus</span> | <span class="param-type">Array.&lt;module:locale.ExtensionLocaleData></span> | <span class="param-type">void</span> </li> </ul> <dl class="details"> <dt class="tag-source">Source:</dt> <dd class="tag-source"><ul class="dummy"><li> <a href="svgcanvas_selection.js.html">svgcanvas/selection.js</a>, <a href="svgcanvas_selection.js.html#line170">line 170</a> </li></ul></dd> <dt class="tag-tutorial">Tutorials:</dt> <dd class="tag-tutorial"> <ul> <li><a href="tutorial-ExtensionDocs.html">Extension Docs</a></li> </ul> </dd> </dl> <h4 class="name" id=".ExtensionVarBuilder"><span class="type-signature"></span>ExtensionVarBuilder<span class="signature">(name)</span><span class="type-signature"> &rarr; {<a href="module-svgcanvas.SvgCanvas.html#event:event:ext_addLangData">module:svgcanvas.SvgCanvas#event:ext_addLangData</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>name</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>The name of the extension</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_selection.js.html">svgcanvas/selection.js</a>, <a href="svgcanvas_selection.js.html#line174">line 174</a> </li></ul></dd> </dl> <h5>Returns:</h5> <dl> <dt> Type </dt> <dd> <span class="param-type"><a href="module-svgcanvas.SvgCanvas.html#event:event:ext_addLangData">module:svgcanvas.SvgCanvas#event:ext_addLangData</a></span> </dd> </dl> <h4 class="name" id=".ImageEmbeddedCallback"><span class="type-signature"></span>ImageEmbeddedCallback<span class="signature">(result)</span><span class="type-signature"> &rarr; {void}</span></h4> <div class="description"> <p>Function to run when image data is found.</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>result</code></td> <td class="type"> <span class="param-type">string</span> | <span class="param-type">false</span> </td> <td class="description last"><p>Data URL</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_svg-exec.js.html">svgcanvas/svg-exec.js</a>, <a href="svgcanvas_svg-exec.js.html#line636">line 636</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=".ImageEmbeddedCallback"><span class="type-signature"></span>ImageEmbeddedCallback<span class="signature">(result)</span><span class="type-signature"> &rarr; {void}</span></h4> <div class="description"> <p>Function to run when image data is found.</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>result</code></td> <td class="type"> <span class="param-type">string</span> | <span class="param-type">false</span> </td> <td class="description last"><p>Data URL</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_svgcanvas.js.html">svgcanvas/svgcanvas.js</a>, <a href="svgcanvas_svgcanvas.js.html#line1415">line 1415</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=".ImageExportedResults">ImageExportedResults</h4> <h5>Type:</h5> <ul> <li> <span class="param-type"><a href="global.html#PlainObject">PlainObject</a></span> </li> </ul> <h5 class="subsection-title">Properties:</h5> <table class="props"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>datauri</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>Contents as a Data URL</p></td> </tr> <tr> <td class="name"><code>bloburl</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>May be the empty string</p></td> </tr> <tr> <td class="name"><code>svg</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>The SVG contents as a string</p></td> </tr> <tr> <td class="name"><code>issues</code></td> <td class="type"> <span class="param-type">Array.&lt;string></span> </td> <td class="description last"><p>The localization messages of <code>issueCodes</code></p></td> </tr> <tr> <td class="name"><code>issueCodes</code></td> <td class="type"> <span class="param-type">Array.&lt;<a href="module-svgcanvas.html#.IssueCode">module:svgcanvas.IssueCode</a>></span> </td> <td class="description last"><p>CanVG issues found with the SVG</p></td> </tr> <tr> <td class="name"><code>type</code></td> <td class="type"> <span class="param-type">"PNG"</span> | <span class="param-type">"JPEG"</span> | <span class="param-type">"BMP"</span> | <span class="param-type">"WEBP"</span> | <span class="param-type">"ICO"</span> </td> <td class="description last"><p>The chosen image type</p></td> </tr> <tr> <td class="name"><code>mimeType</code></td> <td class="type"> <span class="param-type">"image/png"</span> | <span class="param-type">"image/jpeg"</span> | <span class="param-type">"image/bmp"</span> | <span class="param-type">"image/webp"</span> </td> <td class="description last"><p>The image MIME type</p></td> </tr> <tr> <td class="name"><code>quality</code></td> <td class="type"> <span class="param-type"><a href="global.html#Float">Float</a></span> </td> <td class="description last"><p>A decimal between 0 and 1 (for use with JPEG or WEBP)</p></td> </tr> <tr> <td class="name"><code>exportWindowName</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>A convenience for passing along a <code>window.name</code> to target a window on which the export could be added</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_svg-exec.js.html">svgcanvas/svg-exec.js</a>, <a href="svgcanvas_svg-exec.js.html#line718">line 718</a> </li></ul></dd> </dl> <h4 class="name" id=".ImageExportedResults">ImageExportedResults</h4> <h5>Type:</h5> <ul> <li> <span class="param-type"><a href="global.html#PlainObject">PlainObject</a></span> </li> </ul> <h5 class="subsection-title">Properties:</h5> <table class="props"> <thead> <tr> <th>Name</th> <th>Type</th> <th class="last">Description</th> </tr> </thead> <tbody> <tr> <td class="name"><code>datauri</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>Contents as a Data URL</p></td> </tr> <tr> <td class="name"><code>bloburl</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>May be the empty string</p></td> </tr> <tr> <td class="name"><code>svg</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>The SVG contents as a string</p></td> </tr> <tr> <td class="name"><code>issues</code></td> <td class="type"> <span class="param-type">Array.&lt;string></span> </td> <td class="description last"><p>The localization messages of <code>issueCodes</code></p></td> </tr> <tr> <td class="name"><code>issueCodes</code></td> <td class="type"> <span class="param-type">Array.&lt;<a href="module-svgcanvas.html#.IssueCode">module:svgcanvas.IssueCode</a>></span> </td> <td class="description last"><p>CanVG issues found with the SVG</p></td> </tr> <tr> <td class="name"><code>type</code></td> <td class="type"> <span class="param-type">"PNG"</span> | <span class="param-type">"JPEG"</span> | <span class="param-type">"BMP"</span> | <span class="param-type">"WEBP"</span> | <span class="param-type">"ICO"</span> </td> <td class="description last"><p>The chosen image type</p></td> </tr> <tr> <td class="name"><code>mimeType</code></td> <td class="type"> <span class="param-type">"image/png"</span> | <span class="param-type">"image/jpeg"</span> | <span class="param-type">"image/bmp"</span> | <span class="param-type">"image/webp"</span> </td> <td class="description last"><p>The image MIME type</p></td> </tr> <tr> <td class="name"><code>quality</code></td> <td class="type"> <span class="param-type"><a href="global.html#Float">Float</a></span> </td> <td class="description last"><p>A decimal between 0 and 1 (for use with JPEG or WEBP)</p></td> </tr> <tr> <td class="name"><code>exportWindowName</code></td> <td class="type"> <span class="param-type">string</span> </td> <td class="description last"><p>A convenience for passing along a <code>window.name</code> to target a window on which the export could be added</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_svgcanvas.js.html">svgcanvas/svgcanvas.js</a>, <a href="svgcanvas_svgcanvas.js.html#line1448">line 1448</a> </li></ul></dd> </dl> <h4 class="name" id=".IssueCode">IssueCode</h4> <h5>Type:</h5> <ul> <li> <span class="param-type">"feGaussianBlur"</span> | <span class="param-type">"foreignObject"</span> | <span class="param-type">"[stroke-dasharray]"</span> | <span class="param-type">"text"</span> </li> </ul> <dl class="details"> <dt c