maxGraph/docs/js-api/files/shape/mxShape-js.html

167 lines
104 KiB
HTML
Raw Normal View History

2012-05-21 20:32:26 +00:00
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><title>mxShape</title><link rel="stylesheet" type="text/css" href="../../styles/main.css"><script language=JavaScript src="../../javascript/main.js"></script><script language=JavaScript src="../../javascript/prettify.js"></script><script language=JavaScript src="../../javascript/searchdata.js"></script></head><body class="ContentPage" onLoad="NDOnLoad();prettyPrint();"><script language=JavaScript><!--
if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>
<!-- Generated by Natural Docs, version 1.5 -->
<!-- http://www.naturaldocs.org -->
<!-- saved from url=(0026)http://www.naturaldocs.org -->
2013-07-12 07:09:46 +00:00
<div id=Content><div class="CClass"><div class=CTopic id=MainTopic><h1 class=CTitle><a name="mxShape"></a>mxShape</h1><div class=CBody><p>Base class for all shapes.&nbsp; A shape in mxGraph is a separate implementation for SVG, VML and HTML.&nbsp; Which implementation to use is controlled by the <a href="#mxShape.dialect" class=LVariable id=link75 onMouseOver="ShowTip(event, 'tt2', 'link75')" onMouseOut="HideTip('tt2')">dialect</a> property which is assigned from within the <a href="../view/mxCellRenderer-js.html#mxCellRenderer" class=LClass id=link76 onMouseOver="ShowTip(event, 'tt67', 'link76')" onMouseOut="HideTip('tt67')">mxCellRenderer</a> when the shape is created.&nbsp; The dialect must be assigned for a shape, and it does normally depend on the browser and the confiuration of the graph (see <a href="../view/mxGraph-js.html#mxGraph" class=LClass id=link77 onMouseOver="ShowTip(event, 'tt68', 'link77')" onMouseOut="HideTip('tt68')">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.&nbsp; 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).&nbsp; The HTML implementation is optional but may be required for a HTML-only view of the graph.</p><h4 class=CHeading>Custom Shapes</h4><p>To extend from this class, the basic code looks as follows.&nbsp; In the special case where the custom shape consists only of one filled region or one filled region and an additional stroke the <a href="mxActor-js.html#mxActor" class=LClass id=link78 onMouseOver="ShowTip(event, 'tt69', 'link78')" onMouseOut="HideTip('tt69')">mxActor</a> and <a href="mxCylinder-js.html#mxCylinder" class=LClass id=link79 onMouseOver="ShowTip(event, 'tt70', 'link79')" onMouseOut="HideTip('tt70')">mxCylinder</a> should be subclassed, respectively.</p><blockquote><pre class="prettyprint">function CustomShape() { }
2012-05-21 20:32:26 +00:00
CustomShape.prototype = new mxShape();
2013-05-23 16:14:48 +00:00
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&rsquo;s cell renderer as follows:</p><blockquote><pre class="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.&nbsp; For example, to change the shape for the default vertex style, the following code is used:</p><blockquote><pre class="prettyprint">var style = graph.getStylesheet().getDefaultVertexStyle();
2013-07-12 07:09:46 +00:00
style[mxConstants.STYLE_SHAPE] = 'customShape';</pre></blockquote><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SMain"><td class=SEntry><a href="#mxShape" >mxShape</a></td><td class=SDescription>Base class for all shapes. </td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#mxShape.Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent2 SMarked"><td class=SEntry><a href="#mxShape.mxShape" id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')">mxShape</a></td><td class=SDescription>Constructs a new shape.</td></tr><tr class="SGroup SIndent1"><td class=SEntry><a href="#mxShape.Variables" >Variables</a></td><td class=SDescription></td></tr><tr class="SVariable SIndent2 SMarked"><td class=SEntry><a href="#mxShape.dialect" id=link2 onMouseOver="ShowTip(event, 'tt2', 'link2')" onMouseOut="HideTip('tt2')">dialect</a></td><td class=SDescription>Holds the dialect in which the shape is to be painted. </td></tr><tr class="SVariable SIndent2"><td class=SEntry><a href="#mxShape.scale" id=link3 onMouseOver="ShowTip(event, 'tt3', 'link3')" onMouseOut="HideTip('tt3')">scale</a></td><td class=SDescription>Holds the scale in which the shape is being painted.</td></tr><tr class="SVariable SIndent2 SMarked"><td class=SEntry><a href="#mxShape.bounds" id=link4 onMouseOver="ShowTip(event, 'tt4', 'link4')" onMouseOut="HideTip('tt4')">bounds</a></td><td class=SDescription>Holds the <a href="../util/mxRectangle-js.html#mxRectangle" class=LClass id=link5 onMouseOver="ShowTip(event, 'tt5', 'link5')" onMouseOut="HideTip('tt5')">mxRectangle</a> that specifies the bounds of this shape.</td></tr><tr class="SVariable SIndent2"><td class=SEntry><a href="#mxShape.points" id=link6 onMouseOver="ShowTip(event, 'tt6', 'link6')" onMouseOut="HideTip('tt6')">points</a></td><td class=SDescription>Holds the array of <a href="../util/mxPoint-js.html#mxPoint" class=LClass id=link7 onMouseOver="ShowTip(event, 'tt7', 'link7')" onMouseOut="HideTip('tt7')">mxPoints</a> that specify the points of this shape.</td></tr><tr class="SVariable SIndent2 SMarked"><td class=SEntry><a href="#mxShape.node" id=link8 onMouseOver="ShowTip(event, 'tt8', 'link8')" onMouseOut="HideTip('tt8')">node</a></td><td class=SDescription>Holds the outermost DOM node that represents this shape.</td></tr><tr class="SVariable SIndent2"><td class=SEntry><a href="#mxShape.state" id=link9 onMouseOver="ShowTip(event, 'tt9', 'link9')" onMouseOut="HideTip('tt9')">state</a></td><td class=SDescription>Optional reference to the corresponding <a href="../view/mxCellState-js.html#mxCellState" class=LClass id=link10 onMouseOver="ShowTip(event, 'tt10', 'link10')" onMouseOut="HideTip('tt10')">mxCellState</a>.</td></tr><tr class="SVariable SIndent2 SMarked"><td class=SEntry><a href="#mxShape.style" id=link11 onMouseOver="ShowTip(event, 'tt11', 'link11')" onMouseOut="HideTip('tt11')">style</a></td><td class=SDescription>Optional reference to the style of the corresponding <a href="../view/mxCellState-js.html#mxCellState" class=LClass id=link12 onMouseOver="ShowTip(event, 'tt10', 'link12')" onMouseOut="HideTip('tt10')">mxCellState</a>.</td></tr><tr class="SVariable SIndent2"><td class=SEntry><a href="#mxShape.boundingBox" id=link13 onMouseOver="ShowTip(event, 'tt12', 'link13')" onMouseOut="HideTip('tt12')">boundingBox</a></td><td class=SDescription>Contains the bounding box of the shape, that is, the smallest rectangle that includes all pixels of the shape.</td></tr><tr class="SVariable SIndent2 SMarked"><td class=SEntry><a href="#mxShape.stencil" id=link14 onMouseOver="ShowTip(event, 'tt13', 'link14')" onMouseOut="HideTip('tt13')">stencil</a></td><td class=SDescription>Holds the <a href="mxStencil-js.html#mxStencil" class=LClass id=link15 onMouseOver="ShowTip(event, 'tt14', 'link15')" onMouseOut="HideTip('tt14')">mxStencil</a> that defines the shape.</td></tr><tr class="SVariable SIndent2"><td class=SEntry><a href="#mxShape.svgS
2012-05-21 20:32:26 +00:00
<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="mxShape.Functions"></a>Functions</h3></div></div>
2013-05-23 16:14:48 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxShape.mxShape"></a>mxShape</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>function mxShape(</td><td class=PParameter nowrap>stencil</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Constructs a new shape.</p></div></div></div>
2012-05-21 20:32:26 +00:00
<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="mxShape.Variables"></a>Variables</h3></div></div>
2013-07-12 07:09:46 +00:00
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxShape.dialect"></a>dialect</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxShape.prototype.dialect</td></tr></table></blockquote><p>Holds the dialect in which the shape is to be painted.&nbsp; This can be one of the DIALECT constants in <a href="../util/mxConstants-js.html#mxConstants" class=LClass id=link80 onMouseOver="ShowTip(event, 'tt71', 'link80')" onMouseOut="HideTip('tt71')">mxConstants</a>.</p></div></div></div>
2012-05-21 20:32:26 +00:00
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxShape.scale"></a>scale</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxShape.prototype.scale</td></tr></table></blockquote><p>Holds the scale in which the shape is being painted.</p></div></div></div>
2013-07-12 07:09:46 +00:00
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxShape.bounds"></a>bounds</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxShape.prototype.bounds</td></tr></table></blockquote><p>Holds the <a href="../util/mxRectangle-js.html#mxRectangle" class=LClass id=link81 onMouseOver="ShowTip(event, 'tt5', 'link81')" onMouseOut="HideTip('tt5')">mxRectangle</a> that specifies the bounds of this shape.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-07-12 07:09:46 +00:00
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxShape.points"></a>points</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxShape.prototype.points</td></tr></table></blockquote><p>Holds the array of <a href="../util/mxPoint-js.html#mxPoint" class=LClass id=link82 onMouseOver="ShowTip(event, 'tt7', 'link82')" onMouseOut="HideTip('tt7')">mxPoints</a> that specify the points of this shape.</p></div></div></div>
2012-05-21 20:32:26 +00:00
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxShape.node"></a>node</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxShape.prototype.node</td></tr></table></blockquote><p>Holds the outermost DOM node that represents this shape.</p></div></div></div>
2013-07-12 07:09:46 +00:00
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxShape.state"></a>state</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxShape.prototype.state</td></tr></table></blockquote><p>Optional reference to the corresponding <a href="../view/mxCellState-js.html#mxCellState" class=LClass id=link83 onMouseOver="ShowTip(event, 'tt10', 'link83')" onMouseOut="HideTip('tt10')">mxCellState</a>.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-07-12 07:09:46 +00:00
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxShape.style"></a>style</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxShape.prototype.style</td></tr></table></blockquote><p>Optional reference to the style of the corresponding <a href="../view/mxCellState-js.html#mxCellState" class=LClass id=link84 onMouseOver="ShowTip(event, 'tt10', 'link84')" onMouseOut="HideTip('tt10')">mxCellState</a>.</p></div></div></div>
2012-05-30 16:26:17 +00:00
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxShape.boundingBox"></a>boundingBox</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>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>
2012-05-21 20:32:26 +00:00
2013-07-12 07:09:46 +00:00
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxShape.stencil"></a>stencil</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxShape.prototype.stencil</td></tr></table></blockquote><p>Holds the <a href="mxStencil-js.html#mxStencil" class=LClass id=link85 onMouseOver="ShowTip(event, 'tt14', 'link85')" onMouseOut="HideTip('tt14')">mxStencil</a> that defines the shape.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-07-12 07:09:46 +00:00
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxShape.svgStrokeTolerance"></a>svgStrokeTolerance</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxShape.prototype.svgStrokeTolerance</td></tr></table></blockquote><p>Event-tolerance for SVG strokes (in px).&nbsp; Default is 6.&nbsp; This is only passed to the canvas in <a href="#mxShape.createSvgCanvas" class=LFunction id=link86 onMouseOver="ShowTip(event, 'tt35', 'link86')" onMouseOut="HideTip('tt35')">createSvgCanvas</a> if <a href="#mxShape.pointerEvents" class=LVariable id=link87 onMouseOver="ShowTip(event, 'tt16', 'link87')" onMouseOut="HideTip('tt16')">pointerEvents</a> is true.</p></div></div></div>
2012-05-30 16:26:17 +00:00
2013-05-23 16:14:48 +00:00
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxShape.pointerEvents"></a>pointerEvents</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxShape.prototype.pointerEvents</td></tr></table></blockquote><p>Specifies if pointer events should be handled.&nbsp; Default is true.</p></div></div></div>
2012-07-16 15:36:48 +00:00
2013-05-23 16:14:48 +00:00
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxShape.stencilPointerEvents"></a>stencilPointerEvents</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxShape.prototype.stencilPointerEvents</td></tr></table></blockquote><p>Specifies if pointer events outside of stencils should be handled.&nbsp; Default is false.&nbsp; Set this to true for backwards compatibility with the 1.x branch.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-05-23 16:14:48 +00:00
<div class="CVariable"><div class=CTopic><h3 class=CTitle><a name="mxShape.vmlScale"></a>vmlScale</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxShape.prototype.vmlScale</td></tr></table></blockquote><p>Scale for improving the precision of VML rendering.&nbsp; Default is 1.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-05-23 16:14:48 +00:00
<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="mxShape.Functions"></a>Functions</h3></div></div>
2012-05-21 20:32:26 +00:00
2013-07-12 07:09:46 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxShape.init"></a>init</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxShape.prototype.init = function(</td><td class=PParameter nowrap>container</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Initializes the shape by creaing the DOM node using <a href="#mxShape.create" class=LFunction id=link88 onMouseOver="ShowTip(event, 'tt20', 'link88')" onMouseOut="HideTip('tt20')">create</a> and adding it into the given container.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>container</td><td class=CDLDescription>DOM node that will contain the shape.</td></tr></table></div></div></div>
2012-05-21 20:32:26 +00:00
2013-05-23 16:14:48 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxShape.isParseVml"></a>isParseVml</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxShape.prototype.isParseVml = function()</td></tr></table></blockquote><p>Specifies if any VML should be added via insertAdjacentHtml to the DOM.&nbsp; This is only needed in IE8 and only if the shape contains VML markup.&nbsp; This method returns true.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-05-23 16:14:48 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxShape.isHtmlAllowed"></a>isHtmlAllowed</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxShape.prototype.isHtmlAllowed = function()</td></tr></table></blockquote><p>Returns true if HTML is allowed for this shape.&nbsp; This implementation always returns false.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-05-23 16:14:48 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxShape.getSvgScreenOffset"></a>getSvgScreenOffset</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxShape.prototype.getSvgScreenOffset = function()</td></tr></table></blockquote><p>Returns 0, or 0.5 if &lt;strokewidth&gt; % 2 == 1.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-07-12 07:09:46 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxShape.create"></a>create</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxShape.prototype.create = function(</td><td class=PParameter nowrap>container</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Creates and returns the DOM node(s) for the shape in the given container.&nbsp; This implementation invokes <a href="#mxShape.createSvg" class=LFunction id=link89 onMouseOver="ShowTip(event, 'tt24', 'link89')" onMouseOut="HideTip('tt24')">createSvg</a>, <a href="#mxShape.createHtml" class=LFunction id=link90 onMouseOver="ShowTip(event, 'tt26', 'link90')" onMouseOut="HideTip('tt26')">createHtml</a> or <a href="#mxShape.createVml" class=LFunction id=link91 onMouseOver="ShowTip(event, 'tt25', 'link91')" onMouseOut="HideTip('tt25')">createVml</a> depending on the <a href="#mxShape.dialect" class=LVariable id=link92 onMouseOver="ShowTip(event, 'tt2', 'link92')" onMouseOut="HideTip('tt2')">dialect</a> and style settings.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>container</td><td class=CDLDescription>DOM node that will contain the shape.</td></tr></table></div></div></div>
2012-05-21 20:32:26 +00:00
2013-05-23 16:14:48 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxShape.createSvg"></a>createSvg</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxShape.prototype.createSvg = function()</td></tr></table></blockquote><p>Creates and returns the SVG node(s) to represent this shape.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-05-23 16:14:48 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxShape.createVml"></a>createVml</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxShape.prototype.createVml = function()</td></tr></table></blockquote><p>Creates and returns the VML node to represent this shape.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-07-12 07:09:46 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxShape.createHtml"></a>createHtml</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxShape.prototype.createHtml = function()</td></tr></table></blockquote><p>Creates and returns the HTML DOM node(s) to represent this shape.&nbsp; This implementation falls back to <a href="#mxShape.createVml" class=LFunction id=link93 onMouseOver="ShowTip(event, 'tt25', 'link93')" onMouseOut="HideTip('tt25')">createVml</a> so that the HTML creation is optional.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-05-23 16:14:48 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxShape.reconfigure"></a>reconfigure</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxShape.prototype.reconfigure = function()</td></tr></table></blockquote><p>Reconfigures this shape.&nbsp; This will update the colors etc in addition to the bounds or points.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-05-23 16:14:48 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxShape.redraw"></a>redraw</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxShape.prototype.redraw = function()</td></tr></table></blockquote><p>Creates and returns the SVG node(s) to represent this shape.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-05-23 16:14:48 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxShape.updateBoundsFromPoints"></a>updateBoundsFromPoints</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxShape.prototype.updateBoundsFromPoints = function()</td></tr></table></blockquote><p>Updates the bounds based on the points.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-07-12 07:09:46 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxShape.getLabelBounds"></a>getLabelBounds</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxShape.prototype.getLabelBounds = function(</td><td class=PParameter nowrap>rect</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the <a href="../util/mxRectangle-js.html#mxRectangle" class=LClass id=link94 onMouseOver="ShowTip(event, 'tt5', 'link94')" onMouseOut="HideTip('tt5')">mxRectangle</a> for the label bounds of this shape, based on the given scaled and translated bounds of the shape.&nbsp; This method should not change the rectangle in-place.&nbsp; This implementation returns the given rect.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-05-23 16:14:48 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxShape.checkBounds"></a>checkBounds</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>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>
2012-05-21 20:32:26 +00:00
2013-05-23 16:14:48 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxShape.createVmlGroup"></a>createVmlGroup</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxShape.prototype.createVmlGroup = function()</td></tr></table></blockquote><p>Returns the temporary element used for rendering in IE8 standards mode.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-05-23 16:14:48 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxShape.redrawShape"></a>redrawShape</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxShape.prototype.redrawShape = function()</td></tr></table></blockquote><p>Updates the SVG or VML shape.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-05-23 16:14:48 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxShape.createCanvas"></a>createCanvas</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxShape.prototype.createCanvas = function()</td></tr></table></blockquote><p>Destroys the given canvas which was used for drawing.&nbsp; This implementation increments the reference counts on all shared gradients used in the canvas.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-07-12 07:09:46 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxShape.createSvgCanvas"></a>createSvgCanvas</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxShape.prototype.createSvgCanvas = function()</td></tr></table></blockquote><p>Creates and returns an <a href="../util/mxSvgCanvas2D-js.html#mxSvgCanvas2D" class=LClass id=link95 onMouseOver="ShowTip(event, 'tt36', 'link95')" onMouseOut="HideTip('tt36')">mxSvgCanvas2D</a> for rendering this shape.</p></div></div></div>
2013-06-28 19:07:06 +00:00
2013-07-12 07:09:46 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxShape.createVmlCanvas"></a>createVmlCanvas</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxShape.prototype.createVmlCanvas = function()</td></tr></table></blockquote><p>Creates and returns an <a href="../util/mxVmlCanvas2D-js.html#mxVmlCanvas2D" class=LClass id=link96 onMouseOver="ShowTip(event, 'tt38', 'link96')" onMouseOut="HideTip('tt38')">mxVmlCanvas2D</a> for rendering this shape.</p></div></div></div>
2013-06-28 19:07:06 +00:00
2013-05-23 16:14:48 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxShape.updateVmlContainer"></a>updateVmlContainer</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxShape.prototype.updateVmlContainer = function()</td></tr></table></blockquote><p>Updates the bounds of the VML container.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-05-23 16:14:48 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxShape.destroyCanvas"></a>destroyCanvas</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxShape.prototype.destroyCanvas = function(</td><td class=PParameter nowrap>canvas</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Destroys the given canvas which was used for drawing.&nbsp; This implementation increments the reference counts on all shared gradients used in the canvas.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-05-23 16:14:48 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxShape.paint"></a>paint</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxShape.prototype.paint = function(</td><td class=PParameter nowrap>c</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Generic rendering code.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-05-23 16:14:48 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxShape.configureCanvas"></a>configureCanvas</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxShape.prototype.configureCanvas = function(</td><td class=PParameter nowrap>c,</td></tr><tr><td></td><td class=PParameter nowrap>x,</td></tr><tr><td></td><td class=PParameter nowrap>y,</td></tr><tr><td></td><td class=PParameter nowrap>w,</td></tr><tr><td></td><td class=PParameter nowrap>h</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Sets the state of the canvas for drawing the shape.</p></div></div></div>
2013-01-16 09:00:09 +00:00
2013-05-23 16:14:48 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxShape.getGradientBounds"></a>getGradientBounds</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxShape.prototype.getGradientBounds = function(</td><td class=PParameter nowrap>c,</td></tr><tr><td></td><td class=PParameter nowrap>x,</td></tr><tr><td></td><td class=PParameter nowrap>y,</td></tr><tr><td></td><td class=PParameter nowrap>w,</td></tr><tr><td></td><td class=PParameter nowrap>h</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the bounding box for the gradient box for this shape.</p></div></div></div>
2013-01-16 09:00:09 +00:00
2013-05-23 16:14:48 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxShape.updateTransform"></a>updateTransform</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxShape.prototype.updateTransform = function(</td><td class=PParameter nowrap>c,</td></tr><tr><td></td><td class=PParameter nowrap>x,</td></tr><tr><td></td><td class=PParameter nowrap>y,</td></tr><tr><td></td><td class=PParameter nowrap>w,</td></tr><tr><td></td><td class=PParameter nowrap>h</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Sets the scale and rotation on the given canvas.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-05-23 16:14:48 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxShape.paintStencilShape"></a>paintStencilShape</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxShape.prototype.paintStencilShape = function(</td><td class=PParameter nowrap>c,</td></tr><tr><td></td><td class=PParameter nowrap>x,</td></tr><tr><td></td><td class=PParameter nowrap>y,</td></tr><tr><td></td><td class=PParameter nowrap>w,</td></tr><tr><td></td><td class=PParameter nowrap>h</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Paints the line shape.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-05-23 16:14:48 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxShape.paintVertexShape"></a>paintVertexShape</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxShape.prototype.paintVertexShape = function(</td><td class=PParameter nowrap>c,</td></tr><tr><td></td><td class=PParameter nowrap>x,</td></tr><tr><td></td><td class=PParameter nowrap>y,</td></tr><tr><td></td><td class=PParameter nowrap>w,</td></tr><tr><td></td><td class=PParameter nowrap>h</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Paints the vertex shape.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-05-23 16:14:48 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxShape.paintBackground"></a>paintBackground</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxShape.prototype.paintBackground = function(</td><td class=PParameter nowrap>c,</td></tr><tr><td></td><td class=PParameter nowrap>x,</td></tr><tr><td></td><td class=PParameter nowrap>y,</td></tr><tr><td></td><td class=PParameter nowrap>w,</td></tr><tr><td></td><td class=PParameter nowrap>h</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Hook for subclassers.&nbsp; This implementation is empty.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-05-23 16:14:48 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxShape.paintForeground"></a>paintForeground</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxShape.prototype.paintForeground = function(</td><td class=PParameter nowrap>c,</td></tr><tr><td></td><td class=PParameter nowrap>x,</td></tr><tr><td></td><td class=PParameter nowrap>y,</td></tr><tr><td></td><td class=PParameter nowrap>w,</td></tr><tr><td></td><td class=PParameter nowrap>h</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Hook for subclassers.&nbsp; This implementation is empty.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-05-23 16:14:48 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxShape.paintEdgeShape"></a>paintEdgeShape</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxShape.prototype.paintEdgeShape = function(</td><td class=PParameter nowrap>c,</td></tr><tr><td></td><td class=PParameter nowrap>pts</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Hook for subclassers.&nbsp; This implementation is empty.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-05-23 16:14:48 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxShape.getArcSize"></a>getArcSize</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxShape.prototype.getArcSize = function(</td><td class=PParameter nowrap>w,</td></tr><tr><td></td><td class=PParameter nowrap>h</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns the arc size for the given dimension.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-05-23 16:14:48 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxShape.paintGlassEffect"></a>paintGlassEffect</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxShape.prototype.paintGlassEffect = function(</td><td class=PParameter nowrap>c,</td></tr><tr><td></td><td class=PParameter nowrap>x,</td></tr><tr><td></td><td class=PParameter nowrap>y,</td></tr><tr><td></td><td class=PParameter nowrap>w,</td></tr><tr><td></td><td class=PParameter nowrap>h,</td></tr><tr><td></td><td class=PParameter nowrap>arc</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Paints the glass gradient effect.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-07-12 07:09:46 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxShape.apply"></a>apply</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxShape.prototype.apply = function(</td><td class=PParameter nowrap>state</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Applies the style of the given <a href="../view/mxCellState-js.html#mxCellState" class=LClass id=link97 onMouseOver="ShowTip(event, 'tt10', 'link97')" onMouseOut="HideTip('tt10')">mxCellState</a> to the shape.&nbsp; This implementation assigns the following styles to local fields:</p><ul><li><a href="../util/mxConstants-js.html#mxConstants.STYLE_FILLCOLOR" class=LVariable id=link98 onMouseOver="ShowTip(event, 'tt72', 'link98')" onMouseOut="HideTip('tt72')">mxConstants.STYLE_FILLCOLOR</a> =&gt; fill</li><li><a href="../util/mxConstants-js.html#mxConstants.STYLE_GRADIENTCOLOR" class=LVariable id=link99 onMouseOver="ShowTip(event, 'tt73', 'link99')" onMouseOut="HideTip('tt73')">mxConstants.STYLE_GRADIENTCOLOR</a> =&gt; gradient</li><li><a href="../util/mxConstants-js.html#mxConstants.STYLE_GRADIENT_DIRECTION" class=LVariable id=link100 onMouseOver="ShowTip(event, 'tt74', 'link100')" onMouseOut="HideTip('tt74')">mxConstants.STYLE_GRADIENT_DIRECTION</a> =&gt; gradientDirection</li><li><a href="../util/mxConstants-js.html#mxConstants.STYLE_OPACITY" class=LVariable id=link101 onMouseOver="ShowTip(event, 'tt75', 'link101')" onMouseOut="HideTip('tt75')">mxConstants.STYLE_OPACITY</a> =&gt; opacity</li><li><a href="../util/mxConstants-js.html#mxConstants.STYLE_STROKECOLOR" class=LVariable id=link102 onMouseOver="ShowTip(event, 'tt76', 'link102')" onMouseOut="HideTip('tt76')">mxConstants.STYLE_STROKECOLOR</a> =&gt; stroke</li><li><a href="../util/mxConstants-js.html#mxConstants.STYLE_STROKEWIDTH" class=LVariable id=link103 onMouseOver="ShowTip(event, 'tt77', 'link103')" onMouseOut="HideTip('tt77')">mxConstants.STYLE_STROKEWIDTH</a> =&gt; strokewidth</li><li><a href="../util/mxConstants-js.html#mxConstants.STYLE_SHADOW" class=LVariable id=link104 onMouseOver="ShowTip(event, 'tt78', 'link104')" onMouseOut="HideTip('tt78')">mxConstants.STYLE_SHADOW</a> =&gt; isShadow</li><li><a href="../util/mxConstants-js.html#mxConstants.STYLE_DASHED" class=LVariable id=link105 onMouseOver="ShowTip(event, 'tt79', 'link105')" onMouseOut="HideTip('tt79')">mxConstants.STYLE_DASHED</a> =&gt; isDashed</li><li><a href="../util/mxConstants-js.html#mxConstants.STYLE_SPACING" class=LVariable id=link106 onMouseOver="ShowTip(event, 'tt80', 'link106')" onMouseOut="HideTip('tt80')">mxConstants.STYLE_SPACING</a> =&gt; spacing</li><li><a href="../util/mxConstants-js.html#mxConstants.STYLE_STARTSIZE" class=LVariable id=link107 onMouseOver="ShowTip(event, 'tt81', 'link107')" onMouseOut="HideTip('tt81')">mxConstants.STYLE_STARTSIZE</a> =&gt; startSize</li><li><a href="../util/mxConstants-js.html#mxConstants.STYLE_ENDSIZE" class=LVariable id=link108 onMouseOver="ShowTip(event, 'tt82', 'link108')" onMouseOut="HideTip('tt82')">mxConstants.STYLE_ENDSIZE</a> =&gt; endSize</li><li><a href="../util/mxConstants-js.html#mxConstants.STYLE_ROUNDED" class=LVariable id=link109 onMouseOver="ShowTip(event, 'tt83', 'link109')" onMouseOut="HideTip('tt83')">mxConstants.STYLE_ROUNDED</a> =&gt; isRounded</li><li><a href="../util/mxConstants-js.html#mxConstants.STYLE_STARTARROW" class=LVariable id=link110 onMouseOver="ShowTip(event, 'tt84', 'link110')" onMouseOut="HideTip('tt84')">mxConstants.STYLE_STARTARROW</a> =&gt; startArrow</li><li><a href="../util/mxConstants-js.html#mxConstants.STYLE_ENDARROW" class=LVariable id=link111 onMouseOver="ShowTip(event, 'tt85', 'link111')" onMouseOut="HideTip('tt85')">mxConstants.STYLE_ENDARROW</a> =&gt; endArrow</li><li><a href="../util/mxConstants-js.html#mxConstants.STYLE_ROTATION" class=LVariable id=link112 onMouseOver="ShowTip(event, 'tt86', 'link112')" onMouseOut="HideTip('tt86')">mxConstants.STYLE_R
2012-05-21 20:32:26 +00:00
2013-05-23 16:14:48 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxShape.setCursor"></a>setCursor</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxShape.prototype.setCursor = function(</td><td class=PParameter nowrap>cursor</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Sets the cursor on the given shape.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>cursor</td><td class=CDLDescription>The cursor to be used.</td></tr></table></div></div></div>
2012-05-21 20:32:26 +00:00
2013-05-23 16:14:48 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxShape.getCursor"></a>getCursor</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxShape.prototype.getCursor = function()</td></tr></table></blockquote><p>Returns the current cursor.</p></div></div></div>
2012-05-30 16:26:17 +00:00
2013-07-12 07:09:46 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxShape.updateBoundingBox"></a>updateBoundingBox</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxShape.prototype.updateBoundingBox = function()</td></tr></table></blockquote><p>Updates the <a href="#mxShape.boundingBox" class=LVariable id=link118 onMouseOver="ShowTip(event, 'tt12', 'link118')" onMouseOut="HideTip('tt12')">boundingBox</a> for this shape using <a href="#mxShape.createBoundingBox" class=LFunction id=link119 onMouseOver="ShowTip(event, 'tt56', 'link119')" onMouseOut="HideTip('tt56')">createBoundingBox</a> and <a href="#mxShape.augmentBoundingBox" class=LFunction id=link120 onMouseOver="ShowTip(event, 'tt57', 'link120')" onMouseOut="HideTip('tt57')">augmentBoundingBox</a> and stores the result in <a href="#mxShape.boundingBox" class=LVariable id=link121 onMouseOver="ShowTip(event, 'tt12', 'link121')" onMouseOut="HideTip('tt12')">boundingBox</a>.</p></div></div></div>
2012-05-30 16:26:17 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxShape.createBoundingBox"></a>createBoundingBox</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>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>
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxShape.augmentBoundingBox"></a>augmentBoundingBox</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxShape.prototype.augmentBoundingBox = function(</td><td class=PParameter nowrap>bbox</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Augments the bounding box with the strokewidth and shadow offsets.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-05-23 16:14:48 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxShape.isPaintBoundsInverted"></a>isPaintBoundsInverted</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxShape.prototype.isPaintBoundsInverted = function()</td></tr></table></blockquote><p>Returns true if the bounds should be inverted.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-05-23 16:14:48 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxShape.getRotation"></a>getRotation</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxShape.prototype.getRotation = function()</td></tr></table></blockquote><p>Returns the rotation from the style.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-05-23 16:14:48 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxShape.getTextRotation"></a>getTextRotation</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxShape.prototype.getTextRotation = function()</td></tr></table></blockquote><p>Returns the rotation for the text label.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-05-23 16:14:48 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxShape.getShapeRotation"></a>getShapeRotation</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxShape.prototype.getShapeRotation = function()</td></tr></table></blockquote><p>Returns the actual rotation of the shape.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-06-28 19:07:06 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxShape.addTransparentBackgroundRectangle"></a>addTransparentBackgroundRectangle</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxShape.prototype.addTransparentBackgroundRectangle = function(</td><td class=PParameter nowrap>node,</td></tr><tr><td></td><td class=PParameter nowrap>x,</td></tr><tr><td></td><td class=PParameter nowrap>y,</td></tr><tr><td></td><td class=PParameter nowrap>w,</td></tr><tr><td></td><td class=PParameter nowrap>h</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Adds a transparent rectangle that catches all events.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-06-28 19:07:06 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxShape.setTransparentBackgroundImage"></a>setTransparentBackgroundImage</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxShape.prototype.setTransparentBackgroundImage = function(</td><td class=PParameter nowrap>node</td><td class=PAfterParameters 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>
2012-05-21 20:32:26 +00:00
2013-05-23 16:14:48 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxShape.releaseSvgGradients"></a>releaseSvgGradients</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>mxShape.prototype.releaseSvgGradients = function(</td><td class=PParameter nowrap>grads</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote><p>Paints the line shape.</p></div></div></div>
2012-05-21 20:32:26 +00:00
2013-07-12 07:09:46 +00:00
<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="mxShape.destroy"></a>destroy</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>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 <a href="../util/mxEvent-js.html#mxEvent.release" class=LFunction id=link122 onMouseOver="ShowTip(event, 'tt66', 'link122')" onMouseOut="HideTip('tt66')">mxEvent.release</a>.</p></div></div></div>
2012-05-21 20:32:26 +00:00
</div><!--Content-->
<div id=Footer><a href="http://www.naturaldocs.org">Generated by Natural Docs</a></div><!--Footer-->
2013-06-28 19:07:06 +00:00
<div id=Menu><div class=MEntry><div class=MFile><a href="../index-txt.html">API Specification</a></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent1')">Editor</a><div class=MGroupContent id=MGroupContent1><div class=MEntry><div class=MFile><a href="../editor/mxDefaultKeyHandler-js.html">mxDefaultKeyHandler</a></div></div><div class=MEntry><div class=MFile><a href="../editor/mxDefaultPopupMenu-js.html">mxDefaultPopupMenu</a></div></div><div class=MEntry><div class=MFile><a href="../editor/mxDefaultToolbar-js.html">mxDefaultToolbar</a></div></div><div class=MEntry><div class=MFile><a href="../editor/mxEditor-js.html">mxEditor</a></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent2')">Handler</a><div class=MGroupContent id=MGroupContent2><div class=MEntry><div class=MFile><a href="../handler/mxCellHighlight-js.html">mxCellHighlight</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxCellMarker-js.html">mxCellMarker</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxCellTracker-js.html">mxCellTracker</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxConnectionHandler-js.html">mxConnectionHandler</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxConstraintHandler-js.html">mxConstraintHandler</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxEdgeHandler-js.html">mxEdgeHandler</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxEdgeSegmentHandler-js.html">mxEdgeSegmentHandler.js</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxElbowEdgeHandler-js.html">mxElbowEdgeHandler</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxGraphHandler-js.html">mxGraphHandler</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxKeyHandler-js.html">mxKeyHandler</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxPanningHandler-js.html">mxPanningHandler</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxPopupMenuHandler-js.html">mxPanningHandler</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxRubberband-js.html">mxRubberband</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxSelectionCellsHandler-js.html">mxSelectionCellsHandler</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxTooltipHandler-js.html">mxTooltipHandler</a></div></div><div class=MEntry><div class=MFile><a href="../handler/mxVertexHandler-js.html">mxVertexHandler</a></div></div></div></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent3')">Io</a><div class=MGroupContent id=MGroupContent3><div class=MEntry><div class=MFile><a href="../io/mxCellCodec-js.html">mxCellCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxChildChangeCodec-js.html">mxChildChangeCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxCodec-js.html">mxCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxCodecRegistry-js.html">mxCodecRegistry</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxDefaultKeyHandlerCodec-js.html">mxDefaultKeyHandlerCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxDefaultPopupMenuCodec-js.html">mxDefaultPopupMenuCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxDefaultToolbarCodec-js.html">mxDefaultToolbarCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxEditorCodec-js.html">mxEditorCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxGenericChangeCodec-js.html">mxGenericChangeCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxGraphCodec-js.html">mxGraphCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxGraphViewCodec-js.html">mxGraphViewCodec</a></div></div><div class=MEntry><div class=MFile><a href="../io/mxModelCodec-js.html">mxModelCodec</a></d
2012-05-21 20:32:26 +00:00
var searchPanel = new SearchPanel("searchPanel", "HTML", "../../search");
--></script><div id=MSearchPanel class=MSearchPanelInactive><input type=text id=MSearchField value=Search onFocus="searchPanel.OnSearchFieldFocus(true)" onBlur="searchPanel.OnSearchFieldFocus(false)" onKeyUp="searchPanel.OnSearchFieldChange()"><select id=MSearchType onFocus="searchPanel.OnSearchTypeFocus(true)" onBlur="searchPanel.OnSearchTypeFocus(false)" onChange="searchPanel.OnSearchTypeChange()"><option id=MSearchEverything selected value="General">Everything</option><option value="Classes">Classes</option><option value="Cookies">Cookies</option><option value="Events">Events</option><option value="Files">Files</option><option value="Functions">Functions</option><option value="Variables">Variables</option></select></div><script language=JavaScript><!--
HideAllBut([9], 13);// --></script></div><!--Menu-->
<!--START_ND_TOOLTIPS-->
2013-07-12 07:09:46 +00:00
<div class=CToolTip id="tt1"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class=PBeforeParameters nowrap>function mxShape(</td><td class=PParameter nowrap>stencil</td><td class=PAfterParameters nowrap>)</td></tr></table></td></tr></table></blockquote>Constructs a new shape.</div></div><div class=CToolTip id="tt2"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxShape.prototype.dialect</td></tr></table></blockquote>Holds the dialect in which the shape is to be painted. </div></div><div class=CToolTip id="tt3"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxShape.prototype.scale</td></tr></table></blockquote>Holds the scale in which the shape is being painted.</div></div><div class=CToolTip id="tt4"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxShape.prototype.bounds</td></tr></table></blockquote>Holds the mxRectangle that specifies the bounds of this shape.</div></div><div class=CToolTip id="tt5"><div class=CClass>Extends mxPoint to implement a 2-dimensional rectangle with double precision coordinates.</div></div><div class=CToolTip id="tt6"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxShape.prototype.points</td></tr></table></blockquote>Holds the array of mxPoints that specify the points of this shape.</div></div><div class=CToolTip id="tt7"><div class=CClass>Implements a 2-dimensional vector with double precision coordinates.</div></div><div class=CToolTip id="tt8"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxShape.prototype.node</td></tr></table></blockquote>Holds the outermost DOM node that represents this shape.</div></div><div class=CToolTip id="tt9"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxShape.prototype.state</td></tr></table></blockquote>Optional reference to the corresponding mxCellState.</div></div><div class=CToolTip id="tt10"><div class=CClass>Represents the current state of a cell in a given mxGraphView.</div></div><div class=CToolTip id="tt11"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxShape.prototype.style</td></tr></table></blockquote>Optional reference to the style of the corresponding mxCellState.</div></div><div class=CToolTip id="tt12"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>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><div class=CToolTip id="tt13"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxShape.prototype.stencil</td></tr></table></blockquote>Holds the mxStencil that defines the shape.</div></div><div class=CToolTip id="tt14"><div class=CClass>Implements a generic shape which is based on a XML node as a description. </div></div><div class=CToolTip id="tt15"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxShape.prototype.svgStrokeTolerance</td></tr></table></blockquote>Event-tolerance for SVG strokes (in px). </div></div><div class=CToolTip id="tt16"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxShape.prototype.pointerEvents</td></tr></table></blockquote>Specifies if pointer events should be handled. </div></div><div class=CToolTip id="tt17"><div class=CVariable><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype prettyprint"><tr><td>mxShape.prototy
2012-05-21 20:32:26 +00:00
<div id=MSearchResultsWindow><iframe src="" frameborder=0 name=MSearchResults id=MSearchResults></iframe><a href="javascript:searchPanel.CloseResultsWindow()" id=MSearchResultsWindowClose>Close</a></div>
<script language=JavaScript><!--
if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>