<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=link58onMouseOver="ShowTip(event, 'tt1', 'link58')"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><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=link59onMouseOver="ShowTip(event, 'tt58', 'link59')"onMouseOut="HideTip('tt58')">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.foOffset"id=link11onMouseOver="ShowTip(event, 'tt11', 'link11')"onMouseOut=
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxSvgCanvas2D.mxSvgCanvas2D"></a>mxSvgCanvas2D</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>function mxSvgCanvas2D(</td><tdclass="PParameter prettyprint "nowrap>root,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>styleEnabled</td><tdclass="PAfterParameters prettyprint "nowrap>)</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"><tr><tdclass="prettyprint">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"><tr><tdclass="prettyprint">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"><tr><tdclass="prettyprint">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"><tr><tdclass="prettyprint">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"><tr><tdclass="prettyprint">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"><tr><tdclass="prettyprint">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"><tr><tdclass="prettyprint">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"><tr><tdclass="prettyprint">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.foOffset"></a>foOffset</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxSvgCanvas2D.prototype.foOffset</td></tr></table></blockquote><p>Offset to be used for foreignObjects.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxSvgCanvas2D.textOffset"></a>textOffset</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxSvgCanvas2D.prototype.textOffset</td></tr></table></blockquote><p>Offset to be used for text elements.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxSvgCanvas2D.imageOffset"></a>imageOffset</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxSvgCanvas2D.prototype.imageOffset</td></tr></table></blockquote><p>Offset to be used for image elements.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxSvgCanvas2D.strokeTolerance"></a>strokeTolerance</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxSvgCanvas2D.prototype.strokeTolerance</td></tr></table></blockquote><p>Adds transparent paths for strokes.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxSvgCanvas2D.minStrokeWidth"></a>minStrokeWidth</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxSvgCanvas2D.prototype.minStrokeWidth</td></tr></table></blockquote><p>Minimum stroke width for output.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxSvgCanvas2D.refCount"></a>refCount</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">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"><tr><tdclass="prettyprint">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="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxSvgCanvas2D.lineHeightCorrection"></a>lineHeightCorrection</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxSvgCanvas2D.prototype.lineHeightCorrection</td></tr></table></blockquote><p>Correction factor for <ahref="mxConstants-js.html#mxConstants.LINE_HEIGHT"class=LVariableid=link60onMouseOver="ShowTip(event, 'tt19', 'link60')"onMouseOut="HideTip('tt19')">mxConstants.LINE_HEIGHT</a> in HTML output. Default is 1.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxSvgCanvas2D.pointerEventsValue"></a>pointerEventsValue</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxSvgCanvas2D.prototype.pointerEventsValue</td></tr></table></blockquote><p>Default value for active pointer events. Default is all.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxSvgCanvas2D.fontMetricsPadding"></a>fontMetricsPadding</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxSvgCanvas2D.prototype.fontMetricsPadding</td></tr></table></blockquote><p>Padding to be added for text that is not wrapped to account for differences in font metrics on different platforms in pixels. Default is 10.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxSvgCanvas2D.cacheOffsetSize"></a>cacheOffsetSize</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxSvgCanvas2D.prototype.cacheOffsetSize</td></tr></table></blockquote><p>Specifies if offsetWidth and offsetHeight should be cached. Default is true. This is used to speed up repaint of text in <updateText>.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxSvgCanvas2D.getBaseUrl"></a>getBaseUrl</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxSvgCanvas2D.prototype.getBaseUrl = function()</td></tr></table></blockquote><p>Returns the URL of the page without the hash part. This needs to use href to include any search part with no params (ie question mark alone). This is a workaround for the fact that window.location.search is empty if there is no search string behind the question mark.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxSvgCanvas2D.reset"></a>reset</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">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.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.updateFill"></a>updateFill</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">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"><tr><tdclass="prettyprint">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"><tr><tdclass="prettyprint">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"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxSvgCanvas2D.prototype.createDashPattern = function(</td><tdclass="PParameter prettyprint "nowrap>scale</td><tdclass="PAfterParameters prettyprint "nowrap>)</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"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxSvgCanvas2D.prototype.createTolerance = function(</td><tdclass="PParameter prettyprint "nowrap>node</td><tdclass="PAfterParameters prettyprint "nowrap>)</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"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxSvgCanvas2D.prototype.createShadow = function(</td><tdclass="PParameter prettyprint "nowrap>node</td><tdclass="PAfterParameters prettyprint "nowrap>)</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.convertHtml"></a>convertHtml</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxSvgCanvas2D.prototype.convertHtml = function(</td><tdclass="PParameter prettyprint "nowrap>val</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Converts the given HTML string to XHTML.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxSvgCanvas2D.createDiv"></a>createDiv</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxSvgCanvas2D.prototype.createDiv = function(</td><tdclass="PParameter prettyprint "nowrap>str</td><tdclass="PAfterParameters prettyprint "nowrap>)</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.addForeignObject"></a>addForeignObject</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxSvgCanvas2D.prototype.addForeignObject = function(</td><tdclass="PParameter prettyprint "nowrap>x,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>y,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>w,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>h,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>str,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>align,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>valign,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>wrap,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>format,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>overflow,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>clip,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>rotation,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>dir,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>div,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>root</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Creates a foreignObject for the given string and adds it to the given root.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxSvgCanvas2D.getTextCss"></a>getTextCss</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxSvgCanvas2D.prototype.getTextCss = function()</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"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxSvgCanvas2D.prototype.text = function(</td><tdclass="PParameter prettyprint "nowrap>x,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>y,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>w,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>h,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>str,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>align,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>valign,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>wrap,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>format,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>overflow,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>clip,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>rotation,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>dir</td><tdclass="PAfterParameters prettyprint "nowrap>)</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=link61onMouseOver="ShowTip(event, 'tt9', 'link61')"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.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"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxSvgCanvas2D.prototype.updateFont = function(</td><tdclass="PParameter prettyprint "nowrap>node</td><tdclass="PAfterParameters prettyprint "nowrap>)</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.stroke"></a>stroke</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">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"><tr><tdclass="prettyprint">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"><tr><tdclass="prettyprint">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"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>function mxSvgCanvas2D(</td><tdclass="PParameter prettyprint "nowrap>root,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>styleEnabled</td><tdclass="PAfterParameters prettyprint "nowrap>)</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"><tr><tdclass="prettyprint">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"><tr><tdclass="prettyprint">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"><tr><tdclass="prettyprint">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"><tr><tdclass="prettyprint">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"><tr><tdclass="prettyprint">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"><tr><tdclass="prettyprint">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"><tr><tdclass="prettyprint">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"><tr><tdclass="prettyprint">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"><tr><tdclass="prettyprint">mxSvgCanvas2D.prototype.foOffset</td></tr></table></blockquote>Offset to be used for foreignObjects.</div></div><divclass=CToolTipid="tt12"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxSvgCanvas2D.prototype.textOffset</td></tr></table></blockquote>Offset to be used for text elements.</div></div><divclass=CToolTipid="tt13"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxSvgCanvas2D.prototype.imageOffset</td></tr></table></blockquote>Offset to be used for image elements.</div></div><divclass=CToolTipid="tt14"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxSvgCanvas2D.prototype.strokeTolerance</td></tr></table></blockquote>Adds transparent paths for strokes.</div></div><divclass=CToolTipid="tt15"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxSvgCanvas2D.prototype.minStrokeWidth</t