<divid=Content><divclass="CClass"><divclass=CTopicid=MainTopic><h1class=CTitle><aname="mxSvgCanvas2D"></a>mxSvgCanvas2D</h1><divclass=CBody><p>Extends <ahref="mxAbstractCanvas2D-js.html#mxAbstractCanvas2D"class=LClassid=link41onMouseOver="ShowTip(event, 'tt1', 'link41')"onMouseOut="HideTip('tt1')">mxAbstractCanvas2D</a> to implement a canvas for SVG. This canvas writes all calls as SVG output to the given SVG root node.</p><h4class=CHeading>Open issues</h4><ul><li>Opacity for transformed foreignObjects in Chrome.</li><li>Gradient IDs must be refactored for fragments.</li></ul><blockquote><preclass="prettyprint">var svgDoc = mxUtils.createXmlDocument();
var svgCanvas = new mxSvgCanvas2D(root);</pre></blockquote><p>A description of the public API is available in <ahref="mxXmlCanvas2D-js.html#mxXmlCanvas2D"class=LClassid=link42onMouseOver="ShowTip(event, 'tt41', 'link42')"onMouseOut="HideTip('tt41')">mxXmlCanvas2D</a>.</p><p>To disable anti-aliasing in the output, use the following code.</p><blockquote><preclass="prettyprint">graph.view.canvas.ownerSVGElement.setAttribute('shape-rendering', 'crispEdges');</pre></blockquote><p>Or set the respective attribute in the SVG element directly.</p><!--START_ND_SUMMARY--><divclass=Summary><divclass=STitle>Summary</div><divclass=SBorder><tableborder=0cellspacing=0cellpadding=0class=STable><trclass="SMain"><tdclass=SEntry><ahref="#mxSvgCanvas2D">mxSvgCanvas2D</a></td><tdclass=SDescription>Extends <ahref="mxAbstractCanvas2D-js.html#mxAbstractCanvas2D"class=LClassid=link1onMouseOver="ShowTip(event, 'tt1', 'link1')"onMouseOut="HideTip('tt1')">mxAbstractCanvas2D</a> to implement a canvas for SVG. </td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#mxSvgCanvas2D.Functions">Functions</a></td><tdclass=SDescription></td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#mxSvgCanvas2D.mxSvgCanvas2D"id=link2onMouseOver="ShowTip(event, 'tt2', 'link2')"onMouseOut="HideTip('tt2')">mxSvgCanvas2D</a></td><tdclass=SDescription>Constructs a new SVG canvas.</td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#mxSvgCanvas2D.Variables">Variables</a></td><tdclass=SDescription></td></tr><trclass="SVariable SIndent2 SMarked"><tdclass=SEntry><ahref="#mxSvgCanvas2D.root"id=link3onMouseOver="ShowTip(event, 'tt3', 'link3')"onMouseOut="HideTip('tt3')">root</a></td><tdclass=SDescription>Reference to the container for the SVG content.</td></tr><trclass="SVariable SIndent2"><tdclass=SEntry><ahref="#mxSvgCanvas2D.gradients"id=link4onMouseOver="ShowTip(event, 'tt4', 'link4')"onMouseOut="HideTip('tt4')">gradients</a></td><tdclass=SDescription>Local cache of gradients for quick lookups.</td></tr><trclass="SVariable SIndent2 SMarked"><tdclass=SEntry><ahref="#mxSvgCanvas2D.defs"id=link5onMouseOver="ShowTip(event, 'tt5', 'link5')"onMouseOut="HideTip('tt5')">defs</a></td><tdclass=SDescription>Reference to the defs section of the SVG document. </td></tr><trclass="SVariable SIndent2"><tdclass=SEntry><ahref="#mxSvgCanvas2D.styleEnabled"id=link6onMouseOver="ShowTip(event, 'tt6', 'link6')"onMouseOut="HideTip('tt6')">styleEnabled</a></td><tdclass=SDescription>Stores the value of styleEnabled passed to the constructor.</td></tr><trclass="SVariable SIndent2 SMarked"><tdclass=SEntry><ahref="#mxSvgCanvas2D.path">path</a></td><tdclass=SDescription>Holds the current DOM node.</td></tr><trclass="SVariable SIndent2"><tdclass=SEntry><ahref="#mxSvgCanvas2D.matchHtmlAlignment"id=link7onMouseOver="ShowTip(event, 'tt7', 'link7')"onMouseOut="HideTip('tt7')">matchHtmlAlignment</a></td><tdclass=SDescription>Specifies if plain text output should match the vertical HTML alignment. </td></tr><trclass="SVariable SIndent2 SMarked"><tdclass=SEntry><ahref="#mxSvgCanvas2D.textEnabled"id=link8onMouseOver="ShowTip(event, 'tt8', 'link8')"onMouseOut="HideTip('tt8')">textEnabled</a></td><tdclass=SDescription>Specifies if text output should be enabled. </td></tr><trclass="SVariable SIndent2"><tdclass=SEntry><ahref="#mxSvgCanvas2D.foEnabled"id=link9onMouseOver="ShowTip(event, 'tt9', 'link9')"onMouseOut="HideTip('tt9')">foEnabled</a></td><tdclass=SDescription>Specifies if use of foreignObject for HTML markup is allowed. </td></tr><trclass="SVariable SIndent2 SMarked"><tdclass=SEntry><ahref="#mxSvgCanvas2D.foAltText"id=link10onMouseOver="ShowTip(event, 'tt10', 'link10')"onMouseOut="HideTip('tt10')">foAltText</a></td><tdclass=SDescription>Specifies the fallback text for unsupported foreignObjects in exported documents. </td></tr><trclass="SVariable SIndent2"><tdclass=SEntry><ahref="#mxSvgCanvas2D.strokeTolerance"id=link11onMouseOver="ShowTip(event, 'tt11', 'link11')"onMo
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxSvgCanvas2D.mxSvgCanvas2D"></a>mxSvgCanvas2D</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>function mxSvgCanvas2D(</td><tdclass=PParameternowrap>root,</td></tr><tr><td></td><tdclass=PParameternowrap>styleEnabled</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Constructs a new SVG canvas.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>root</td><tdclass=CDLDescription>SVG container for the output.</td></tr><tr><tdclass=CDLEntry>styleEnabled</td><tdclass=CDLDescription>Optional boolean that specifies if a style section should be added. The style section sets the default font-size, font-family and stroke-miterlimit globally. Default is false.</td></tr></table></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxSvgCanvas2D.root"></a>root</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>this.root</td></tr></table></blockquote><p>Reference to the container for the SVG content.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxSvgCanvas2D.gradients"></a>gradients</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>this.gradients</td></tr></table></blockquote><p>Local cache of gradients for quick lookups.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxSvgCanvas2D.defs"></a>defs</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>this.defs</td></tr></table></blockquote><p>Reference to the defs section of the SVG document. Only for export.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxSvgCanvas2D.styleEnabled"></a>styleEnabled</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>this.styleEnabled</td></tr></table></blockquote><p>Stores the value of styleEnabled passed to the constructor.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxSvgCanvas2D.path"></a>path</h3><divclass=CBody><p>Holds the current DOM node.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxSvgCanvas2D.matchHtmlAlignment"></a>matchHtmlAlignment</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxSvgCanvas2D.prototype.matchHtmlAlignment</td></tr></table></blockquote><p>Specifies if plain text output should match the vertical HTML alignment. Defaul is true.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxSvgCanvas2D.textEnabled"></a>textEnabled</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxSvgCanvas2D.prototype.textEnabled</td></tr></table></blockquote><p>Specifies if text output should be enabled. Default is true.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxSvgCanvas2D.foEnabled"></a>foEnabled</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxSvgCanvas2D.prototype.foEnabled</td></tr></table></blockquote><p>Specifies if use of foreignObject for HTML markup is allowed. Default is true.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxSvgCanvas2D.foAltText"></a>foAltText</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxSvgCanvas2D.prototype.foAltText</td></tr></table></blockquote><p>Specifies the fallback text for unsupported foreignObjects in exported documents. Default is ‘[Object]’. If this is set to null then no fallback text is added to the exported document.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxSvgCanvas2D.refCount"></a>refCount</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxSvgCanvas2D.prototype.refCount</td></tr></table></blockquote><p>Local counter for references in SVG export.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxSvgCanvas2D.blockImagePointerEvents"></a>blockImagePointerEvents</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxSvgCanvas2D.prototype.blockImagePointerEvents</td></tr></table></blockquote><p>Specifies if a transparent rectangle should be added on top of images to absorb all pointer events. Default is false. This is only needed in Firefox to disable control-clicks on images.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxSvgCanvas2D.reset"></a>reset</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxSvgCanvas2D.prototype.reset = function()</td></tr></table></blockquote><p>Returns any offsets for rendering pixels.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxSvgCanvas2D.createElement"></a>createElement</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxSvgCanvas2D.prototype.createElement = function(</td><tdclass=PParameternowrap>tagName,</td></tr><tr><td></td><tdclass=PParameternowrap>namespace</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Private helper function to create SVG elements</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxSvgCanvas2D.getAlternateContent"></a>getAlternateContent</h3><divclass=CBody><p>Returns the alternate content for the given foreignObject.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxSvgCanvas2D.createGradientId"></a>createGradientId</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxSvgCanvas2D.prototype.createGradientId = function(</td><tdclass=PParameternowrap>start,</td></tr><tr><td></td><tdclass=PParameternowrap>end,</td></tr><tr><td></td><tdclass=PParameternowrap>alpha1,</td></tr><tr><td></td><tdclass=PParameternowrap>alpha2,</td></tr><tr><td></td><tdclass=PParameternowrap>direction</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Private helper function to create SVG elements</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxSvgCanvas2D.getSvgGradient"></a>getSvgGradient</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxSvgCanvas2D.prototype.getSvgGradient = function(</td><tdclass=PParameternowrap>start,</td></tr><tr><td></td><tdclass=PParameternowrap>end,</td></tr><tr><td></td><tdclass=PParameternowrap>alpha1,</td></tr><tr><td></td><tdclass=PParameternowrap>alpha2,</td></tr><tr><td></td><tdclass=PParameternowrap>direction</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Private helper function to create SVG elements</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxSvgCanvas2D.createSvgGradient"></a>createSvgGradient</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxSvgCanvas2D.prototype.createSvgGradient = function(</td><tdclass=PParameternowrap>start,</td></tr><tr><td></td><tdclass=PParameternowrap>end,</td></tr><tr><td></td><tdclass=PParameternowrap>alpha1,</td></tr><tr><td></td><tdclass=PParameternowrap>alpha2,</td></tr><tr><td></td><tdclass=PParameternowrap>direction</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Creates the given SVG gradient.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxSvgCanvas2D.addNode"></a>addNode</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxSvgCanvas2D.prototype.addNode = function(</td><tdclass=PParameternowrap>filled,</td></tr><tr><td></td><tdclass=PParameternowrap>stroked</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Private helper function to create SVG elements</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxSvgCanvas2D.updateFill"></a>updateFill</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxSvgCanvas2D.prototype.updateFill = function()</td></tr></table></blockquote><p>Transfers the stroke attributes from <state> to <node>.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxSvgCanvas2D.updateStroke"></a>updateStroke</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxSvgCanvas2D.prototype.updateStroke = function()</td></tr></table></blockquote><p>Transfers the stroke attributes from <state> to <node>.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxSvgCanvas2D.updateStrokeAttributes"></a>updateStrokeAttributes</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxSvgCanvas2D.prototype.updateStrokeAttributes = function()</td></tr></table></blockquote><p>Transfers the stroke attributes from <state> to <node>.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxSvgCanvas2D.createDashPattern"></a>createDashPattern</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxSvgCanvas2D.prototype.createDashPattern = function(</td><tdclass=PParameternowrap>scale</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Creates the SVG dash pattern for the given state.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxSvgCanvas2D.createTolerance"></a>createTolerance</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxSvgCanvas2D.prototype.createTolerance = function(</td><tdclass=PParameternowrap>node</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Creates a hit detection tolerance shape for the given node.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxSvgCanvas2D.createShadow"></a>createShadow</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxSvgCanvas2D.prototype.createShadow = function(</td><tdclass=PParameternowrap>node</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Creates a shadow for the given node.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxSvgCanvas2D.rotate"></a>rotate</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxSvgCanvas2D.prototype.rotate = function(</td><tdclass=PParameternowrap>theta,</td></tr><tr><td></td><tdclass=PParameternowrap>flipH,</td></tr><tr><td></td><tdclass=PParameternowrap>flipV,</td></tr><tr><td></td><tdclass=PParameternowrap>cx,</td></tr><tr><td></td><tdclass=PParameternowrap>cy</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Sets the rotation of the canvas. Note that rotation cannot be concatenated.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxSvgCanvas2D.rect"></a>rect</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxSvgCanvas2D.prototype.rect = function(</td><tdclass=PParameternowrap>x,</td></tr><tr><td></td><tdclass=PParameternowrap>y,</td></tr><tr><td></td><tdclass=PParameternowrap>w,</td></tr><tr><td></td><tdclass=PParameternowrap>h</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Private helper function to create SVG elements</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxSvgCanvas2D.roundrect"></a>roundrect</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxSvgCanvas2D.prototype.roundrect = function(</td><tdclass=PParameternowrap>x,</td></tr><tr><td></td><tdclass=PParameternowrap>y,</td></tr><tr><td></td><tdclass=PParameternowrap>w,</td></tr><tr><td></td><tdclass=PParameternowrap>h,</td></tr><tr><td></td><tdclass=PParameternowrap>dx,</td></tr><tr><td></td><tdclass=PParameternowrap>dy</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Private helper function to create SVG elements</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxSvgCanvas2D.ellipse"></a>ellipse</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxSvgCanvas2D.prototype.ellipse = function(</td><tdclass=PParameternowrap>x,</td></tr><tr><td></td><tdclass=PParameternowrap>y,</td></tr><tr><td></td><tdclass=PParameternowrap>w,</td></tr><tr><td></td><tdclass=PParameternowrap>h</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Private helper function to create SVG elements</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxSvgCanvas2D.image"></a>image</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxSvgCanvas2D.prototype.image = function(</td><tdclass=PParameternowrap>x,</td></tr><tr><td></td><tdclass=PParameternowrap>y,</td></tr><tr><td></td><tdclass=PParameternowrap>w,</td></tr><tr><td></td><tdclass=PParameternowrap>h,</td></tr><tr><td></td><tdclass=PParameternowrap>src,</td></tr><tr><td></td><tdclass=PParameternowrap>aspect,</td></tr><tr><td></td><tdclass=PParameternowrap>flipH,</td></tr><tr><td></td><tdclass=PParameternowrap>flipV</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Private helper function to create SVG elements</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxSvgCanvas2D.createDiv"></a>createDiv</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxSvgCanvas2D.prototype.createDiv = function(</td><tdclass=PParameternowrap>str,</td></tr><tr><td></td><tdclass=PParameternowrap>align,</td></tr><tr><td></td><tdclass=PParameternowrap>valign,</td></tr><tr><td></td><tdclass=PParameternowrap>style,</td></tr><tr><td></td><tdclass=PParameternowrap>overflow</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Private helper function to create SVG elements</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxSvgCanvas2D.text"></a>text</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxSvgCanvas2D.prototype.text = function(</td><tdclass=PParameternowrap>x,</td></tr><tr><td></td><tdclass=PParameternowrap>y,</td></tr><tr><td></td><tdclass=PParameternowrap>w,</td></tr><tr><td></td><tdclass=PParameternowrap>h,</td></tr><tr><td></td><tdclass=PParameternowrap>str,</td></tr><tr><td></td><tdclass=PParameternowrap>align,</td></tr><tr><td></td><tdclass=PParameternowrap>valign,</td></tr><tr><td></td><tdclass=PParameternowrap>wrap,</td></tr><tr><td></td><tdclass=PParameternowrap>format,</td></tr><tr><td></td><tdclass=PParameternowrap>overflow,</td></tr><tr><td></td><tdclass=PParameternowrap>clip,</td></tr><tr><td></td><tdclass=PParameternowrap>rotation</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Paints the given text. Possible values for format are empty string for plain text and html for HTML markup. Note that HTML markup is only supported if foreignObject is supported and <ahref="#mxSvgCanvas2D.foEnabled"class=LVariableid=link43onMouseOver="ShowTip(event, 'tt9', 'link43')"onMouseOut="HideTip('tt9')">foEnabled</a> is true. (This means IE9 and later does currently not support HTML text as part of shapes.)</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxSvgCanvas2D.createClip"></a>createClip</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxSvgCanvas2D.prototype.createClip = function(</td><tdclass=PParameternowrap>x,</td></tr><tr><td></td><tdclass=PParameternowrap>y,</td></tr><tr><td></td><tdclass=PParameternowrap>w,</td></tr><tr><td></td><tdclass=PParameternowrap>h</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Creates a clip for the given coordinates.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxSvgCanvas2D.text"></a>text</h3><divclass=CBody><p>Paints the given text. Possible values for format are empty string for plain text and html for HTML markup.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxSvgCanvas2D.updateFont"></a>updateFont</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxSvgCanvas2D.prototype.updateFont = function(</td><tdclass=PParameternowrap>node</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Updates the text properties for the given node. (NOTE: For this to work in IE, the given node must be a text or tspan element.)</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxSvgCanvas2D.addTextBackground"></a>addTextBackground</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxSvgCanvas2D.prototype.addTextBackground = function(</td><tdclass=PParameternowrap>node,</td></tr><tr><td></td><tdclass=PParameternowrap>str,</td></tr><tr><td></td><tdclass=PParameternowrap>x,</td></tr><tr><td></td><tdclass=PParameternowrap>y,</td></tr><tr><td></td><tdclass=PParameternowrap>w,</td></tr><tr><td></td><tdclass=PParameternowrap>h,</td></tr><tr><td></td><tdclass=PParameternowrap>align,</td></tr><tr><td></td><tdclass=PParameternowrap>valign,</td></tr><tr><td></td><tdclass=PParameternowrap>overflow</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote><p>Background color and border</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxSvgCanvas2D.stroke"></a>stroke</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxSvgCanvas2D.prototype.stroke = function()</td></tr></table></blockquote><p>Paints the outline of the current path.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxSvgCanvas2D.fill"></a>fill</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxSvgCanvas2D.prototype.fill = function()</td></tr></table></blockquote><p>Fills the current path.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxSvgCanvas2D.fillAndStroke"></a>fillAndStroke</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxSvgCanvas2D.prototype.fillAndStroke = function()</td></tr></table></blockquote><p>Fills and paints the outline of the current path.</p></div></div></div>
<divclass=CToolTipid="tt1"><divclass=CClass>Base class for all canvases. </div></div><divclass=CToolTipid="tt2"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>function mxSvgCanvas2D(</td><tdclass=PParameternowrap>root,</td></tr><tr><td></td><tdclass=PParameternowrap>styleEnabled</td><tdclass=PAfterParametersnowrap>)</td></tr></table></td></tr></table></blockquote>Constructs a new SVG canvas.</div></div><divclass=CToolTipid="tt3"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>this.root</td></tr></table></blockquote>Reference to the container for the SVG content.</div></div><divclass=CToolTipid="tt4"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>this.gradients</td></tr></table></blockquote>Local cache of gradients for quick lookups.</div></div><divclass=CToolTipid="tt5"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>this.defs</td></tr></table></blockquote>Reference to the defs section of the SVG document. </div></div><divclass=CToolTipid="tt6"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>this.styleEnabled</td></tr></table></blockquote>Stores the value of styleEnabled passed to the constructor.</div></div><divclass=CToolTipid="tt7"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxSvgCanvas2D.prototype.matchHtmlAlignment</td></tr></table></blockquote>Specifies if plain text output should match the vertical HTML alignment. </div></div><divclass=CToolTipid="tt8"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxSvgCanvas2D.prototype.textEnabled</td></tr></table></blockquote>Specifies if text output should be enabled. </div></div><divclass=CToolTipid="tt9"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxSvgCanvas2D.prototype.foEnabled</td></tr></table></blockquote>Specifies if use of foreignObject for HTML markup is allowed. </div></div><divclass=CToolTipid="tt10"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxSvgCanvas2D.prototype.foAltText</td></tr></table></blockquote>Specifies the fallback text for unsupported foreignObjects in exported documents. </div></div><divclass=CToolTipid="tt11"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxSvgCanvas2D.prototype.strokeTolerance</td></tr></table></blockquote>Adds transparent paths for strokes.</div></div><divclass=CToolTipid="tt12"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxSvgCanvas2D.prototype.refCount</td></tr></table></blockquote>Local counter for references in SVG export.</div></div><divclass=CToolTipid="tt13"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxSvgCanvas2D.prototype.blockImagePointerEvents</td></tr></table></blockquote>Specifies if a transparent rectangle should be added on top of images to absorb all pointer events. </div></div><divclass=CToolTipid="tt14"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td>mxSvgCanvas2D.prototype.reset = function()</td></tr></table></blockquote>Returns any offsets for rendering pixels.</div></div><divclass=CToolTipid="tt15"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype prettyprint"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass=PBeforeParametersnowrap>mxSvgCanvas2D.prot