svgedit/docs/index/Functions.html

53 lines
30 KiB
HTML
Raw Normal View History

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><title>Function Index</title><link rel="stylesheet" type="text/css" href="../styles/main.css"><script language=JavaScript src="../javascript/main.js"></script><script language=JavaScript src="../javascript/searchdata.js"></script></head><body class="IndexPage" onLoad="NDOnLoad()"><script language=JavaScript><!--
if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>
<!-- Generated by Natural Docs, version 1.4 -->
<!-- http://www.naturaldocs.org -->
<!-- saved from url=(0026)http://www.naturaldocs.org -->
<div id=Index><div class=IPageTitle>Function Index</div><div class=INavigationBar>$#! &middot; 0-9 &middot; <a href="#A">A</a> &middot; <a href="#B">B</a> &middot; <a href="#C">C</a> &middot; <a href="#D">D</a> &middot; <a href="#E">E</a> &middot; <a href="#F">F</a> &middot; <a href="Functions2.html#G">G</a> &middot; <a href="Functions2.html#H">H</a> &middot; <a href="Functions2.html#I">I</a> &middot; J &middot; K &middot; <a href="Functions2.html#L">L</a> &middot; <a href="Functions2.html#M">M</a> &middot; N &middot; O &middot; <a href="Functions2.html#P">P</a> &middot; Q &middot; <a href="Functions2.html#R">R</a> &middot; <a href="Functions3.html#S">S</a> &middot; <a href="Functions3.html#T">T</a> &middot; <a href="Functions3.html#U">U</a> &middot; V &middot; <a href="Functions3.html#W">W</a> &middot; X &middot; Y &middot; Z</div><table border=0 cellspacing=0 cellpadding=0><tr><td class=IHeading id=IFirstHeading><a name="A"></a>A</td><td></td></tr><tr><td class=ISymbolPrefix id=IFirstSymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/svgcanvas-js.html#SvgCanvas.addCommandToHistory" id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')" class=ISymbol>addCommandToHistory</a>, <span class=IParent>SvgCanvas</span></td></tr><tr><td class=ISymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.addExtension" id=link2 onMouseOver="ShowTip(event, 'tt2', 'link2')" onMouseOut="HideTip('tt2')" class=ISymbol>addExtension</a>, <span class=IParent>SelectorManager</span></td></tr><tr><td class=ISymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/svgcanvas-js.html#SvgCanvas.BatchCommand.addSubCommand" id=link3 onMouseOver="ShowTip(event, 'tt3', 'link3')" onMouseOut="HideTip('tt3')" class=ISymbol>addSubCommand</a>, <span class=IParent>SvgCanvas.<wbr>BatchCommand</span></td></tr><tr><td class=ISymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.addSvgElementFromJson" id=link4 onMouseOver="ShowTip(event, 'tt4', 'link4')" onMouseOut="HideTip('tt4')" class=ISymbol>addSvgElementFromJson</a>, <span class=IParent>SelectorManager</span></td></tr><tr><td class=ISymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.addToSelection" id=link5 onMouseOver="ShowTip(event, 'tt5', 'link5')" onMouseOut="HideTip('tt5')" class=ISymbol>addToSelection</a>, <span class=IParent>SelectorManager</span></td></tr><tr><td class=ISymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.alignSelectedElements" id=link6 onMouseOver="ShowTip(event, 'tt6', 'link6')" onMouseOut="HideTip('tt6')" class=ISymbol>alignSelectedElements</a>, <span class=IParent>SelectorManager</span></td></tr><tr><td class=ISymbolPrefix>&nbsp;</td><td class=IEntry><span class=ISymbol>apply</span><div class=ISubIndex><a href="../files/svgcanvas-js.html#SvgCanvas.BatchCommand.apply" id=link7 onMouseOver="ShowTip(event, 'tt7', 'link7')" onMouseOut="HideTip('tt7')" class=IParent>SvgCanvas.<wbr>BatchCommand</a><a href="../files/svgcanvas-js.html#SvgCanvas.ChangeElementCommand.apply" id=link8 onMouseOver="ShowTip(event, 'tt8', 'link8')" onMouseOut="HideTip('tt8')" class=IParent>SvgCanvas.<wbr>ChangeElementCommand</a><a href="../files/svgcanvas-js.html#SvgCanvas.InsertElementCommand.apply" id=link9 onMouseOver="ShowTip(event, 'tt9', 'link9')" onMouseOut="HideTip('tt9')" class=IParent>SvgCanvas.<wbr>InsertElementCommand</a><a href="../files/svgcanvas-js.html#SvgCanvas.RemoveElementCommand.apply" id=link10 onMouseOver="ShowTip(event, 'tt10', 'link10')" onMouseOut="HideTip('tt10')" class=IParent>SvgCanvas.<wbr>RemoveElementCommand</a></div></td></tr><tr><td class=ISymbolPrefix id=ILastSymbolPrefix>&nbsp;</td><td class=IEntry><a href="../files/svgcanvas-js.html#SelectorManager.assignAttributes" id=link11 onMouseOver="ShowTip(event, 'tt11', 'link11')" onMouseOut="HideTip('tt11')" class=ISymbol>assignAttributes</a>, <span class=IParent>SelectorManager</span></td></tr><tr><td class=IHeading><a name="B"></a>B</td><td
<!--START_ND_TOOLTIPS-->
<div class=CToolTip id="tt1"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>addCommandToHistory = c.undoCmd.add = function(</td><td class=PParameter nowrap>cmd</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Adds a command object to the undo history stack</div></div><div class=CToolTip id="tt2"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>this.addExtension = function(</td><td class=PParameter nowrap>name,</td></tr><tr><td></td><td class=PParameter nowrap>ext_func</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Add an extension to the editor</div></div><div class=CToolTip id="tt3"><div class=CFunction>Adds a given command to the history stack</div></div><div class=CToolTip id="tt4"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>var addSvgElementFromJson = this.addSvgElementFromJson = function(</td><td class=PParameter nowrap>data</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Create a new SVG element based on the given object keys/values and add it to the current layer The element will be ran through cleanupElement before being returned</div></div><div class=CToolTip id="tt5"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>var addToSelection = this.addToSelection = function(</td><td class=PParameter nowrap>elemsToAdd,</td></tr><tr><td></td><td class=PParameter nowrap>showGrips</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Adds a list of elements to the selection. </div></div><div class=CToolTip id="tt6"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>this.alignSelectedElements = function(</td><td class=PParameter nowrap>type,</td></tr><tr><td></td><td class=PParameter nowrap>relative_to</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Aligns selected elements</div></div><div class=CToolTip id="tt7"><div class=CFunction>Runs &ldquo;apply&rdquo; on all subcommands</div></div><div class=CToolTip id="tt8"><div class=CFunction>Performs the stored change action</div></div><div class=CToolTip id="tt9"><div class=CFunction>Re-Inserts the new element</div></div><div class=CToolTip id="tt10"><div class=CFunction>Re-removes the new element</div></div><div class=CToolTip id="tt11"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>var assignAttributes = this.assignAttributes = function(</td><td class=PParameter nowrap>node,</td></tr><tr><td></td><td class=PParameter nowrap>attrs,</td></tr><tr><td></td><td class=PParameter nowrap>suspendLength,</td></tr><tr><td></td><td class=PParameter nowrap>unitCheck</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Assigns multiple attributes to an element.</div></div><!--END_ND_TOOLTIPS-->
<!--START_ND_TOOLTIPS-->
<div class=CToolTip id="tt12"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>var BatchCommand = this.undoCmd.batch = function(</td><td class=PParameter nowrap>text</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>History command that can contain/execute multiple other commands</div></div><div class=CToolTip id="tt13"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>c.beginUndoableChange = function(</td><td class=PParameter nowrap>attrName,</td></tr><tr><td></td><td class=PParameter nowrap>elems</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>This function tells the canvas to remember the old values of the attrName attribute for each element sent in. </div></div><div class=CToolTip id="tt14"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>c.bind = function(</td><td class=PParameter nowrap>event,</td></tr><tr><td></td><td class=PParameter nowrap>f</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Attaches a callback function to an event</div></div><!--END_ND_TOOLTIPS-->
<!--START_ND_TOOLTIPS-->
<div class=CToolTip id="tt15"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>var ChangeElementCommand = this.undoCmd.changeElement = function(</td><td class=PParameter nowrap>elem,</td></tr><tr><td></td><td class=PParameter nowrap>attrs,</td></tr><tr><td></td><td class=PParameter nowrap>text</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>History command to make a change to an element. </div></div><div class=CToolTip id="tt16"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>var changeSelectedAttribute = this.changeSelectedAttribute = function(</td><td class=PParameter nowrap>attr,</td></tr><tr><td></td><td class=PParameter nowrap>val,</td></tr><tr><td></td><td class=PParameter nowrap>elems</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Change the given/selected element and add the original value to the history stack If you want to change all selectedElements, ignore the elems argument. </div></div><div class=CToolTip id="tt17"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>var changeSelectedAttributeNoUndo = function(</td><td class=PParameter nowrap>attr,</td></tr><tr><td></td><td class=PParameter nowrap>newValue,</td></tr><tr><td></td><td class=PParameter nowrap>elems</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>This function makes the changes to the elements. </div></div><div class=CToolTip id="tt18"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>var cleanupElement = this.cleanupElement = function(</td><td class=PParameter nowrap>element</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Remove unneeded (default) attributes, makes resulting SVG smaller</div></div><div class=CToolTip id="tt19"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>this.clear = function()</td></tr></table></blockquote>Clears the current document. </div></div><div class=CToolTip id="tt20"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>var clearSelection = this.clearSelection = function(</td><td class=PParameter nowrap>noCall</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Clears the selection. </div></div><div class=CToolTip id="tt21"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>this.cloneSelectedElements = function()</td></tr></table></blockquote>Create deep DOM copies (clones) of all selected elements and move them slightly from their originals</div></div><div class=CToolTip id="tt22"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>convertToNum = function(</td><td class=PParameter nowrap>attr,</td></tr><tr><td></td><td class=PParameter nowrap>val</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Converts given values to numbers. </div></div><div class=CToolTip id="tt23"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>this.convertToPath = function(</td><td class=PParameter nowrap>elem,</td></tr><tr><td></td><td class=PParameter nowrap>getBBox</td><td class=PAfterPa
<!--START_ND_TOOLTIPS-->
<div class=CToolTip id="tt28"><div class=CFunction>Converts a string from base64</div></div><div class=CToolTip id="tt29"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>this.deleteCurrentLayer = function()</td></tr></table></blockquote>Deletes the current layer from the drawing and then clears the selection. </div></div><div class=CToolTip id="tt30"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>this.deleteSelectedElements = function()</td></tr></table></blockquote>Removes all selected elements from the DOM and adds the change to the history stack</div></div><!--END_ND_TOOLTIPS-->
<!--START_ND_TOOLTIPS-->
<div class=CToolTip id="tt31"><div class=CFunction>Iterate through all our subcommands and returns all the elements we are changing</div></div><div class=CToolTip id="tt32"><div class=CFunction>Returns array with element associated with this command</div></div><div class=CToolTip id="tt33"><div class=CFunction>Returns array with element associated with this command</div></div><div class=CToolTip id="tt34"><div class=CFunction>Returns array with element associated with this command</div></div><div class=CToolTip id="tt35"><div class=CFunction>Returns array with element associated with this command</div></div><div class=CToolTip id="tt36"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>this.embedImage = function(</td><td class=PParameter nowrap>val,</td></tr><tr><td></td><td class=PParameter nowrap>callback</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Converts a given image file to a data URL when possible, then runs a given callback</div></div><div class=CToolTip id="tt37"><div class=CFunction>Converts a string to base64</div></div><!--END_ND_TOOLTIPS-->
<!--START_ND_TOOLTIPS-->
<div class=CToolTip id="tt38"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>var ffClone = function(</td><td class=PParameter nowrap>elem</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Hack for Firefox bugs where text element features aren&rsquo;t updated. </div></div><div class=CToolTip id="tt39"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>var findDefs = function()</td></tr></table></blockquote>Return the document&rsquo;s defs element, create it first if necessary</div></div><div class=CToolTip id="tt40"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>var findDuplicateGradient = function(</td><td class=PParameter nowrap>grad</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Check if exact gradient already exists</div></div><div class=CToolTip id="tt41"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class=Prototype><tr><td>c.finishUndoableChange = function()</td></tr></table></blockquote>This function returns a BatchCommand object which summarizes the change since beginUndoableChange was called. </div></div><div class=CToolTip id="tt42"><div class=CFunction>Converts XML entities in a string to single characters. </div></div><!--END_ND_TOOLTIPS-->
</div><!--Index-->
<div id=Footer><a href="http://www.naturaldocs.org">Generated by Natural Docs</a></div><!--Footer-->
<div id=Menu><div class=MEntry><div class=MFile><a href="../files/extensions/ext-foreignobject-js.html">setForeignString(xmlString, elt)</a></div></div><div class=MEntry><div class=MFile><a href="../files/svgcanvas-js.html">SvgCanvas</a></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent1')">Index</a><div class=MGroupContent id=MGroupContent1><div class=MEntry><div class=MIndex><a href="General.html">Everything</a></div></div><div class=MEntry><div class=MIndex><a href="Classes.html">Classes</a></div></div><div class=MEntry><div class=MIndex id=MSelected>Functions</div></div><div class=MEntry><div class=MIndex><a href="Interfaces.html">Interfaces</a></div></div></div></div></div><script type="text/javascript"><!--
var searchPanel = new SearchPanel("searchPanel", "HTML", "../search");
--></script><div id=MSearchPanel class=MSearchPanelInactive><input type=text id=MSearchField value=Search onFocus="searchPanel.OnSearchFieldFocus(true)" onBlur="searchPanel.OnSearchFieldFocus(false)" onKeyUp="searchPanel.OnSearchFieldChange()"><select id=MSearchType onFocus="searchPanel.OnSearchTypeFocus(true)" onBlur="searchPanel.OnSearchTypeFocus(false)" onChange="searchPanel.OnSearchTypeChange()"><option id=MSearchEverything selected value="General">Everything</option><option value="Classes">Classes</option><option value="Functions">Functions</option><option value="Interfaces">Interfaces</option></select></div></div><!--Menu-->
<div id=MSearchResultsWindow><iframe src="" frameborder=0 name=MSearchResults id=MSearchResults></iframe><a href="javascript:searchPanel.CloseResultsWindow()" id=MSearchResultsWindowClose>Close</a></div>
<script language=JavaScript><!--
if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>