<divid=Content><divclass="CClass"><divclass=CTopicid=MainTopic><h1class=CTitle><aname="mxShape"></a>mxShape</h1><divclass=CBody><p>Base class for all shapes. A shape in mxGraph is a separate implementation for SVG, VML and HTML. Which implementation to use is controlled by the <ahref="#mxShape.dialect"class=LVariableid=link86onMouseOver="ShowTip(event, 'tt2', 'link86')"onMouseOut="HideTip('tt2')">dialect</a> property which is assigned from within the <ahref="../view/mxCellRenderer-js.html#mxCellRenderer"class=LClassid=link87onMouseOver="ShowTip(event, 'tt78', 'link87')"onMouseOut="HideTip('tt78')">mxCellRenderer</a> when the shape is created. The dialect must be assigned for a shape, and it does normally depend on the browser and the confiuration of the graph (see <ahref="../view/mxGraph-js.html#mxGraph"class=LClassid=link88onMouseOver="ShowTip(event, 'tt79', 'link88')"onMouseOut="HideTip('tt79')">mxGraph</a> rendering hint).</p><p>For each supported shape in SVG and VML, a corresponding shape exists in mxGraph, namely for text, image, rectangle, rhombus, ellipse and polyline. The other shapes are a combination of these shapes (eg. label and swimlane) or they consist of one or more (filled) path objects (eg. actor and cylinder). The HTML implementation is optional but may be required for a HTML-only view of the graph.</p><h4class=CHeading>Custom Shapes</h4><p>To extend from this class, the basic code looks as follows. In the special case where the custom shape consists only of one filled region or one filled region and an additional stroke the <ahref="mxActor-js.html#mxActor"class=LClassid=link89onMouseOver="ShowTip(event, 'tt80', 'link89')"onMouseOut="HideTip('tt80')">mxActor</a> and <ahref="mxCylinder-js.html#mxCylinder"class=LClassid=link90onMouseOver="ShowTip(event, 'tt81', 'link90')"onMouseOut="HideTip('tt81')">mxCylinder</a> should be subclassed, respectively.</p><blockquote><preclass="prettyprint">function CustomShape() { }
CustomShape.prototype.constructor = CustomShape;</pre></blockquote><p>To register a custom shape in an existing graph instance, one must register the shape under a new name in the graph’s cell renderer as follows:</p><blockquote><preclass="prettyprint">mxCellRenderer.registerShape('customShape', CustomShape);</pre></blockquote><p>The second argument is the name of the constructor.</p><p>In order to use the shape you can refer to the given name above in a stylesheet. For example, to change the shape for the default vertex style, the following code is used:</p><blockquote><preclass="prettyprint">var style = graph.getStylesheet().getDefaultVertexStyle();
style[mxConstants.STYLE_SHAPE] = 'customShape';</pre></blockquote><!--START_ND_SUMMARY--><divclass=Summary><divclass=STitle>Summary</div><divclass=SBorder><tableborder=0cellspacing=0cellpadding=0class=STable><trclass="SMain"><tdclass=SEntry><ahref="#mxShape">mxShape</a></td><tdclass=SDescription>Base class for all shapes. </td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#mxShape.Functions">Functions</a></td><tdclass=SDescription></td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#mxShape.mxShape"id=link1onMouseOver="ShowTip(event, 'tt1', 'link1')"onMouseOut="HideTip('tt1')">mxShape</a></td><tdclass=SDescription>Constructs a new shape.</td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#mxShape.Variables">Variables</a></td><tdclass=SDescription></td></tr><trclass="SVariable SIndent2 SMarked"><tdclass=SEntry><ahref="#mxShape.dialect"id=link2onMouseOver="ShowTip(event, 'tt2', 'link2')"onMouseOut="HideTip('tt2')">dialect</a></td><tdclass=SDescription>Holds the dialect in which the shape is to be painted. </td></tr><trclass="SVariable SIndent2"><tdclass=SEntry><ahref="#mxShape.scale"id=link3onMouseOver="ShowTip(event, 'tt3', 'link3')"onMouseOut="HideTip('tt3')">scale</a></td><tdclass=SDescription>Holds the scale in which the shape is being painted.</td></tr><trclass="SVariable SIndent2 SMarked"><tdclass=SEntry><ahref="#mxShape.antiAlias"id=link4onMouseOver="ShowTip(event, 'tt4', 'link4')"onMouseOut="HideTip('tt4')">antiAlias</a></td><tdclass=SDescription>Rendering hint for configuring the canvas.</td></tr><trclass="SVariable SIndent2"><tdclass=SEntry><ahref="#mxShape.bounds"id=link5onMouseOver="ShowTip(event, 'tt5', 'link5')"onMouseOut="HideTip('tt5')">bounds</a></td><tdclass=SDescription>Holds the <ahref="../util/mxRectangle-js.html#mxRectangle"class=LClassid=link6onMouseOver="ShowTip(event, 'tt6', 'link6')"onMouseOut="HideTip('tt6')">mxRectangle</a> that specifies the bounds of this shape.</td></tr><trclass="SVariable SIndent2 SMarked"><tdclass=SEntry><ahref="#mxShape.points"id=link7onMouseOver="ShowTip(event, 'tt7', 'link7')"onMouseOut="HideTip('tt7')">points</a></td><tdclass=SDescription>Holds the array of <ahref="../util/mxPoint-js.html#mxPoint"class=LClassid=link8onMouseOver="ShowTip(event, 'tt8', 'link8')"onMouseOut="HideTip('tt8')">mxPoints</a> that specify the points of this shape.</td></tr><trclass="SVariable SIndent2"><tdclass=SEntry><ahref="#mxShape.node"id=link9onMouseOver="ShowTip(event, 'tt9', 'link9')"onMouseOut="HideTip('tt9')">node</a></td><tdclass=SDescription>Holds the outermost DOM node that represents this shape.</td></tr><trclass="SVariable SIndent2 SMarked"><tdclass=SEntry><ahref="#mxShape.state"id=link10onMouseOver="ShowTip(event, 'tt10', 'link10')"onMouseOut="HideTip('tt10')">state</a></td><tdclass=SDescription>Optional reference to the corresponding <ahref="../view/mxCellState-js.html#mxCellState"class=LClassid=link11onMouseOver="ShowTip(event, 'tt11', 'link11')"onMouseOut="HideTip('tt11')">mxCellState</a>.</td></tr><trclass="SVariable SIndent2"><tdclass=SEntry><ahref="#mxShape.style"id=link12onMouseOver="ShowTip(event, 'tt12', 'link12')"onMouseOut="HideTip('tt12')">style</a></td><tdclass=SDescription>Optional reference to the style of the corresponding <ahref="../view/mxCellState-js.html#mxCellState"class=LClassid=link13onMouseOver="ShowTip(event, 'tt11', 'link13')"onMouseOut="HideTip('tt11')">mxCellState</a>.</td></tr><trclass="SVariable SIndent2 SMarked"><tdclass=SEntry><ahref="#mxShape.boundingBox"id=link14onMouseOver="ShowTip(event, 'tt13', 'link14')"onMouseOut="HideTip('tt13')">boundingBox</a></td><tdclass=SDescription>Contains the bounding box of the shape, that is, the smallest rectangle that includes all pixels of the shape.</td></tr><trclass="SVariable SIndent2"><tdclass=SEntry><ahref="#mxShape.stencil"id=link15onMouseOver="ShowTip(event, 'tt14', 'link15')"onMouseOut="HideTip('tt14')">stencil</a></td><tdclass=SDescription>Holds th
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxShape.dialect"></a>dialect</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxShape.prototype.dialect</td></tr></table></blockquote><p>Holds the dialect in which the shape is to be painted. This can be one of the DIALECT constants in <ahref="../util/mxConstants-js.html#mxConstants"class=LClassid=link91onMouseOver="ShowTip(event, 'tt82', 'link91')"onMouseOut="HideTip('tt82')">mxConstants</a>.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxShape.scale"></a>scale</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxShape.prototype.scale</td></tr></table></blockquote><p>Holds the scale in which the shape is being painted.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxShape.antiAlias"></a>antiAlias</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxShape.prototype.antiAlias</td></tr></table></blockquote><p>Rendering hint for configuring the canvas.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxShape.bounds"></a>bounds</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxShape.prototype.bounds</td></tr></table></blockquote><p>Holds the <ahref="../util/mxRectangle-js.html#mxRectangle"class=LClassid=link92onMouseOver="ShowTip(event, 'tt6', 'link92')"onMouseOut="HideTip('tt6')">mxRectangle</a> that specifies the bounds of this shape.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxShape.points"></a>points</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxShape.prototype.points</td></tr></table></blockquote><p>Holds the array of <ahref="../util/mxPoint-js.html#mxPoint"class=LClassid=link93onMouseOver="ShowTip(event, 'tt8', 'link93')"onMouseOut="HideTip('tt8')">mxPoints</a> that specify the points of this shape.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxShape.node"></a>node</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxShape.prototype.node</td></tr></table></blockquote><p>Holds the outermost DOM node that represents this shape.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxShape.state"></a>state</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxShape.prototype.state</td></tr></table></blockquote><p>Optional reference to the corresponding <ahref="../view/mxCellState-js.html#mxCellState"class=LClassid=link94onMouseOver="ShowTip(event, 'tt11', 'link94')"onMouseOut="HideTip('tt11')">mxCellState</a>.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxShape.style"></a>style</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxShape.prototype.style</td></tr></table></blockquote><p>Optional reference to the style of the corresponding <ahref="../view/mxCellState-js.html#mxCellState"class=LClassid=link95onMouseOver="ShowTip(event, 'tt11', 'link95')"onMouseOut="HideTip('tt11')">mxCellState</a>.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxShape.boundingBox"></a>boundingBox</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxShape.prototype.boundingBox</td></tr></table></blockquote><p>Contains the bounding box of the shape, that is, the smallest rectangle that includes all pixels of the shape.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxShape.stencil"></a>stencil</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxShape.prototype.stencil</td></tr></table></blockquote><p>Holds the <ahref="mxStencil-js.html#mxStencil"class=LClassid=link96onMouseOver="ShowTip(event, 'tt15', 'link96')"onMouseOut="HideTip('tt15')">mxStencil</a> that defines the shape.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxShape.svgStrokeTolerance"></a>svgStrokeTolerance</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxShape.prototype.svgStrokeTolerance</td></tr></table></blockquote><p>Event-tolerance for SVG strokes (in px). Default is 8. This is only passed to the canvas in <ahref="#mxShape.createSvgCanvas"class=LFunctionid=link97onMouseOver="ShowTip(event, 'tt43', 'link97')"onMouseOut="HideTip('tt43')">createSvgCanvas</a> if <ahref="#mxShape.pointerEvents"class=LVariableid=link98onMouseOver="ShowTip(event, 'tt17', 'link98')"onMouseOut="HideTip('tt17')">pointerEvents</a> is true.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxShape.pointerEvents"></a>pointerEvents</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxShape.prototype.pointerEvents</td></tr></table></blockquote><p>Specifies if pointer events should be handled. Default is true.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxShape.svgPointerEvents"></a>svgPointerEvents</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxShape.prototype.svgPointerEvents</td></tr></table></blockquote><p>Specifies if pointer events should be handled. Default is true.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxShape.shapePointerEvents"></a>shapePointerEvents</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxShape.prototype.shapePointerEvents</td></tr></table></blockquote><p>Specifies if pointer events outside of shape should be handled. Default is false.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxShape.stencilPointerEvents"></a>stencilPointerEvents</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxShape.prototype.stencilPointerEvents</td></tr></table></blockquote><p>Specifies if pointer events outside of stencils should be handled. Default is false. Set this to true for backwards compatibility with the 1.x branch.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxShape.vmlScale"></a>vmlScale</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxShape.prototype.vmlScale</td></tr></table></blockquote><p>Scale for improving the precision of VML rendering. Default is 1.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxShape.outline"></a>outline</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxShape.prototype.outline</td></tr></table></blockquote><p>Specifies if the shape should be drawn as an outline. This disables all fill colors and can be used to disable other drawing states that should not be painted for outlines. Default is false. This should be set before calling <ahref="#mxShape.apply"class=LFunctionid=link99onMouseOver="ShowTip(event, 'tt63', 'link99')"onMouseOut="HideTip('tt63')">apply</a>.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxShape.visible"></a>visible</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxShape.prototype.visible</td></tr></table></blockquote><p>Specifies if the shape is visible. Default is true.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxShape.useSvgBoundingBox"></a>useSvgBoundingBox</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxShape.prototype.useSvgBoundingBox</td></tr></table></blockquote><p>Allows to use the SVG bounding box in SVG. Default is false for performance reasons.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxShape.init"></a>init</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxShape.prototype.init = function(</td><tdclass="PParameter prettyprint "nowrap>container</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Initializes the shape by creaing the DOM node using <ahref="#mxShape.create"class=LFunctionid=link100onMouseOver="ShowTip(event, 'tt26', 'link100')"onMouseOut="HideTip('tt26')">create</a> and adding it into the given container.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>container</td><tdclass=CDLDescription>DOM node that will contain the shape.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxShape.initStyles"></a>initStyles</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxShape.prototype.initStyles = function(</td><tdclass="PParameter prettyprint "nowrap>container</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Sets the styles to their default values.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxShape.isParseVml"></a>isParseVml</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxShape.prototype.isParseVml = function()</td></tr></table></blockquote><p>Specifies if any VML should be added via insertAdjacentHtml to the DOM. This is only needed in IE8 and only if the shape contains VML markup. This method returns true.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxShape.isHtmlAllowed"></a>isHtmlAllowed</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxShape.prototype.isHtmlAllowed = function()</td></tr></table></blockquote><p>Returns true if HTML is allowed for this shape. This implementation always returns false.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxShape.create"></a>create</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxShape.prototype.create = function(</td><tdclass="PParameter prettyprint "nowrap>container</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Creates and returns the DOM node(s) for the shape in the given container. This implementation invokes <ahref="#mxShape.createSvg"class=LFunctionid=link101onMouseOver="ShowTip(event, 'tt31', 'link101')"onMouseOut="HideTip('tt31')">createSvg</a>, <ahref="#mxShape.createHtml"class=LFunctionid=link102onMouseOver="ShowTip(event, 'tt33', 'link102')"onMouseOut="HideTip('tt33')">createHtml</a> or <ahref="#mxShape.createVml"class=LFunctionid=link103onMouseOver="ShowTip(event, 'tt32', 'link103')"onMouseOut="HideTip('tt32')">createVml</a> depending on the <ahref="#mxShape.dialect"class=LVariableid=link104onMouseOver="ShowTip(event, 'tt2', 'link104')"onMouseOut="HideTip('tt2')">dialect</a> and style settings.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>container</td><tdclass=CDLDescription>DOM node that will contain the shape.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxShape.createSvg"></a>createSvg</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxShape.prototype.createSvg = function()</td></tr></table></blockquote><p>Creates and returns the SVG node(s) to represent this shape.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxShape.createVml"></a>createVml</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxShape.prototype.createVml = function()</td></tr></table></blockquote><p>Creates and returns the VML node to represent this shape.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxShape.createHtml"></a>createHtml</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxShape.prototype.createHtml = function()</td></tr></table></blockquote><p>Creates and returns the HTML DOM node(s) to represent this shape. This implementation falls back to <ahref="#mxShape.createVml"class=LFunctionid=link105onMouseOver="ShowTip(event, 'tt32', 'link105')"onMouseOut="HideTip('tt32')">createVml</a> so that the HTML creation is optional.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxShape.reconfigure"></a>reconfigure</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxShape.prototype.reconfigure = function()</td></tr></table></blockquote><p>Reconfigures this shape. This will update the colors etc in addition to the bounds or points.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxShape.redraw"></a>redraw</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxShape.prototype.redraw = function()</td></tr></table></blockquote><p>Creates and returns the SVG node(s) to represent this shape.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxShape.clear"></a>clear</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxShape.prototype.clear = function()</td></tr></table></blockquote><p>Removes all child nodes and resets all CSS.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxShape.updateBoundsFromPoints"></a>updateBoundsFromPoints</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxShape.prototype.updateBoundsFromPoints = function()</td></tr></table></blockquote><p>Updates the bounds based on the points.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxShape.getLabelBounds"></a>getLabelBounds</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxShape.prototype.getLabelBounds = function(</td><tdclass="PParameter prettyprint "nowrap>rect</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the <ahref="../util/mxRectangle-js.html#mxRectangle"class=LClassid=link106onMouseOver="ShowTip(event, 'tt6', 'link106')"onMouseOut="HideTip('tt6')">mxRectangle</a> for the label bounds of this shape, based on the given scaled and translated bounds of the shape. This method should not change the rectangle in-place. This implementation returns the given rect.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxShape.checkBounds"></a>checkBounds</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxShape.prototype.checkBounds = function()</td></tr></table></blockquote><p>Returns true if the bounds are not null and all of its variables are numeric.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxShape.createVmlGroup"></a>createVmlGroup</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxShape.prototype.createVmlGroup = function()</td></tr></table></blockquote><p>Returns the temporary element used for rendering in IE8 standards mode.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxShape.redrawShape"></a>redrawShape</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxShape.prototype.redrawShape = function()</td></tr></table></blockquote><p>Updates the SVG or VML shape.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxShape.createCanvas"></a>createCanvas</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxShape.prototype.createCanvas = function()</td></tr></table></blockquote><p>Creates a new canvas for drawing this shape. May return null.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxShape.createSvgCanvas"></a>createSvgCanvas</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxShape.prototype.createSvgCanvas = function()</td></tr></table></blockquote><p>Creates and returns an <ahref="../util/mxSvgCanvas2D-js.html#mxSvgCanvas2D"class=LClassid=link107onMouseOver="ShowTip(event, 'tt44', 'link107')"onMouseOut="HideTip('tt44')">mxSvgCanvas2D</a> for rendering this shape.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxShape.createVmlCanvas"></a>createVmlCanvas</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxShape.prototype.createVmlCanvas = function()</td></tr></table></blockquote><p>Creates and returns an <ahref="../util/mxVmlCanvas2D-js.html#mxVmlCanvas2D"class=LClassid=link108onMouseOver="ShowTip(event, 'tt46', 'link108')"onMouseOut="HideTip('tt46')">mxVmlCanvas2D</a> for rendering this shape.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxShape.updateVmlContainer"></a>updateVmlContainer</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxShape.prototype.updateVmlContainer = function()</td></tr></table></blockquote><p>Updates the bounds of the VML container.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxShape.redrawHtml"></a>redrawHtml</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxShape.prototype.redrawHtmlShape = function()</td></tr></table></blockquote><p>Allow optimization by replacing VML with HTML.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxShape.mixedModeHtml"></a>mixedModeHtml</h3><divclass=CBody><p>Allow optimization by replacing VML with HTML.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxShape.mixedModeHtml"></a>mixedModeHtml</h3><divclass=CBody><p>Allow optimization by replacing VML with HTML.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxShape.destroyCanvas"></a>destroyCanvas</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxShape.prototype.destroyCanvas = function(</td><tdclass="PParameter prettyprint "nowrap>canvas</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Destroys the given canvas which was used for drawing. This implementation increments the reference counts on all shared gradients used in the canvas.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxShape.configureCanvas"></a>configureCanvas</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxShape.prototype.configureCanvas = function(</td><tdclass="PParameter prettyprint "nowrap>c,</td></tr><tr><td></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><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Sets the state of the canvas for drawing the shape.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxShape.updateTransform"></a>updateTransform</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxShape.prototype.updateTransform = function(</td><tdclass="PParameter prettyprint "nowrap>c,</td></tr><tr><td></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><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Sets the scale and rotation on the given canvas.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxShape.getArcSize"></a>getArcSize</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxShape.prototype.getArcSize = function(</td><tdclass="PParameter prettyprint "nowrap>w,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>h</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the arc size for the given dimension.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxShape.resetStyles"></a>resetStyles</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxShape.prototype.resetStyles = function()</td></tr></table></blockquote><p>Resets all styles.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxShape.setCursor"></a>setCursor</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxShape.prototype.setCursor = function(</td><tdclass="PParameter prettyprint "nowrap>cursor</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Sets the cursor on the given shape.</p><h4class=CHeading>Parameters</h4><tableborder=0cellspacing=0cellpadding=0class=CDescriptionList><tr><tdclass=CDLEntry>cursor</td><tdclass=CDLDescription>The cursor to be used.</td></tr></table></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxShape.getCursor"></a>getCursor</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxShape.prototype.getCursor = function()</td></tr></table></blockquote><p>Returns the current cursor.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxShape.updateBoundingBox"></a>updateBoundingBox</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxShape.prototype.updateBoundingBox = function()</td></tr></table></blockquote><p>Updates the <ahref="#mxShape.boundingBox"class=LVariableid=link133onMouseOver="ShowTip(event, 'tt13', 'link133')"onMouseOut="HideTip('tt13')">boundingBox</a> for this shape using <ahref="#mxShape.createBoundingBox"class=LFunctionid=link134onMouseOver="ShowTip(event, 'tt67', 'link134')"onMouseOut="HideTip('tt67')">createBoundingBox</a> and <ahref="#mxShape.augmentBoundingBox"class=LFunctionid=link135onMouseOver="ShowTip(event, 'tt68', 'link135')"onMouseOut="HideTip('tt68')">augmentBoundingBox</a> and stores the result in <ahref="#mxShape.boundingBox"class=LVariableid=link136onMouseOver="ShowTip(event, 'tt13', 'link136')"onMouseOut="HideTip('tt13')">boundingBox</a>.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxShape.createBoundingBox"></a>createBoundingBox</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxShape.prototype.createBoundingBox = function()</td></tr></table></blockquote><p>Returns a new rectangle that represents the bounding box of the bare shape with no shadows or strokewidths.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxShape.augmentBoundingBox"></a>augmentBoundingBox</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxShape.prototype.augmentBoundingBox = function(</td><tdclass="PParameter prettyprint "nowrap>bbox</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Augments the bounding box with the strokewidth and shadow offsets.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxShape.isPaintBoundsInverted"></a>isPaintBoundsInverted</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxShape.prototype.isPaintBoundsInverted = function()</td></tr></table></blockquote><p>Returns true if the bounds should be inverted.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxShape.getRotation"></a>getRotation</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxShape.prototype.getRotation = function()</td></tr></table></blockquote><p>Returns the rotation from the style.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxShape.getTextRotation"></a>getTextRotation</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxShape.prototype.getTextRotation = function()</td></tr></table></blockquote><p>Returns the rotation for the text label.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxShape.getShapeRotation"></a>getShapeRotation</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxShape.prototype.getShapeRotation = function()</td></tr></table></blockquote><p>Returns the actual rotation of the shape.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxShape.setTransparentBackgroundImage"></a>setTransparentBackgroundImage</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxShape.prototype.setTransparentBackgroundImage = function(</td><tdclass="PParameter prettyprint "nowrap>node</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Sets a transparent background CSS style to catch all events.</p><p>Paints the line shape.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxShape.destroy"></a>destroy</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxShape.prototype.destroy = function()</td></tr></table></blockquote><p>Destroys the shape by removing it from the DOM and releasing the DOM node associated with the shape using <ahref="../util/mxEvent-js.html#mxEvent.release"class=LFunctionid=link137onMouseOver="ShowTip(event, 'tt77', 'link137')"onMouseOut="HideTip('tt77')">mxEvent.release</a>.</p></div></div></div>
<divclass=CToolTipid="tt1"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>function mxShape(</td><tdclass="PParameter prettyprint "nowrap>stencil</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Constructs a new shape.</div></div><divclass=CToolTipid="tt2"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxShape.prototype.dialect</td></tr></table></blockquote>Holds the dialect in which the shape is to be painted. </div></div><divclass=CToolTipid="tt3"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxShape.prototype.scale</td></tr></table></blockquote>Holds the scale in which the shape is being painted.</div></div><divclass=CToolTipid="tt4"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxShape.prototype.antiAlias</td></tr></table></blockquote>Rendering hint for configuring the canvas.</div></div><divclass=CToolTipid="tt5"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxShape.prototype.bounds</td></tr></table></blockquote>Holds the mxRectangle that specifies the bounds of this shape.</div></div><divclass=CToolTipid="tt6"><divclass=CClass>Extends mxPoint to implement a 2-dimensional rectangle with double precision coordinates.</div></div><divclass=CToolTipid="tt7"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxShape.prototype.points</td></tr></table></blockquote>Holds the array of mxPoints that specify the points of this shape.</div></div><divclass=CToolTipid="tt8"><divclass=CClass>Implements a 2-dimensional vector with double precision coordinates.</div></div><divclass=CToolTipid="tt9"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxShape.prototype.node</td></tr></table></blockquote>Holds the outermost DOM node that represents this shape.</div></div><divclass=CToolTipid="tt10"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxShape.prototype.state</td></tr></table></blockquote>Optional reference to the corresponding mxCellState.</div></div><divclass=CToolTipid="tt11"><divclass=CClass>Represents the current state of a cell in a given mxGraphView.</div></div><divclass=CToolTipid="tt12"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxShape.prototype.style</td></tr></table></blockquote>Optional reference to the style of the corresponding mxCellState.</div></div><divclass=CToolTipid="tt13"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxShape.prototype.boundingBox</td></tr></table></blockquote>Contains the bounding box of the shape, that is, the smallest rectangle that includes all pixels of the shape.</div></div><divclass=CToolTipid="tt14"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxShape.prototype.stencil</td></tr></table></blockquote>Holds the mxStencil that defines the shape.</div></div><divclass=CToolTipid="tt15"><divclass=CClass>Implements a generic shape which is based on a XML node as a description.</div></div><divclass=CToolTipid="tt16"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxShape.prototype.svgStrokeTolerance</td></tr></table></blockquote>Event-tolerance for SVG strokes (in px). </div></div><divclass=CToolTipid="tt17"><divclass=CVariab