<divid=Content><divclass="CClass"><divclass=CTopicid=MainTopic><h1class=CTitle><aname="mxRectangle"></a>mxRectangle</h1><divclass=CBody><p>Extends <ahref="mxPoint-js.html#mxPoint"class=LClassid=link17onMouseOver="ShowTip(event, 'tt1', 'link17')"onMouseOut="HideTip('tt1')">mxPoint</a> to implement a 2-dimensional rectangle with double precision coordinates.</p><!--START_ND_SUMMARY--><divclass=Summary><divclass=STitle>Summary</div><divclass=SBorder><tableborder=0cellspacing=0cellpadding=0class=STable><trclass="SMain"><tdclass=SEntry><ahref="#mxRectangle">mxRectangle</a></td><tdclass=SDescription>Extends <ahref="mxPoint-js.html#mxPoint"class=LClassid=link1onMouseOver="ShowTip(event, 'tt1', 'link1')"onMouseOut="HideTip('tt1')">mxPoint</a> to implement a 2-dimensional rectangle with double precision coordinates.</td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#mxRectangle.Functions">Functions</a></td><tdclass=SDescription></td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#mxRectangle.mxRectangle"id=link2onMouseOver="ShowTip(event, 'tt2', 'link2')"onMouseOut="HideTip('tt2')">mxRectangle</a></td><tdclass=SDescription>Constructs a new rectangle for the optional parameters. </td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#mxRectangle.Variables">Variables</a></td><tdclass=SDescription></td></tr><trclass="SVariable SIndent2 SMarked"><tdclass=SEntry><ahref="#mxRectangle.width"id=link3onMouseOver="ShowTip(event, 'tt3', 'link3')"onMouseOut="HideTip('tt3')">width</a></td><tdclass=SDescription>Holds the width of the rectangle. </td></tr><trclass="SVariable SIndent2"><tdclass=SEntry><ahref="#mxRectangle.height"id=link4onMouseOver="ShowTip(event, 'tt4', 'link4')"onMouseOut="HideTip('tt4')">height</a></td><tdclass=SDescription>Holds the height of the rectangle. </td></tr><trclass="SGroup SIndent1"><tdclass=SEntry><ahref="#mxRectangle.Functions">Functions</a></td><tdclass=SDescription></td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#mxRectangle.setRect"id=link5onMouseOver="ShowTip(event, 'tt5', 'link5')"onMouseOut="HideTip('tt5')">setRect</a></td><tdclass=SDescription>Sets this rectangle to the specified values</td></tr><trclass="SFunction SIndent2"><tdclass=SEntry><ahref="#mxRectangle.getCenterX"id=link6onMouseOver="ShowTip(event, 'tt6', 'link6')"onMouseOut="HideTip('tt6')">getCenterX</a></td><tdclass=SDescription>Returns the x-coordinate of the center point.</td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#mxRectangle.getCenterY"id=link7onMouseOver="ShowTip(event, 'tt7', 'link7')"onMouseOut="HideTip('tt7')">getCenterY</a></td><tdclass=SDescription>Returns the y-coordinate of the center point.</td></tr><trclass="SFunction SIndent2"><tdclass=SEntry><ahref="#mxRectangle.add"id=link8onMouseOver="ShowTip(event, 'tt8', 'link8')"onMouseOut="HideTip('tt8')">add</a></td><tdclass=SDescription>Adds the given rectangle to this rectangle.</td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#mxRectangle.intersect"id=link9onMouseOver="ShowTip(event, 'tt9', 'link9')"onMouseOut="HideTip('tt9')">intersect</a></td><tdclass=SDescription>Changes this rectangle to where it overlaps with the given rectangle.</td></tr><trclass="SFunction SIndent2"><tdclass=SEntry><ahref="#mxRectangle.grow"id=link10onMouseOver="ShowTip(event, 'tt10', 'link10')"onMouseOut="HideTip('tt10')">grow</a></td><tdclass=SDescription>Grows the rectangle by the given amount, that is, this method subtracts the given amount from the x- and y-coordinates and adds twice the amount to the width and height.</td></tr><trclass="SFunction SIndent2 SMarked"><tdclass=SEntry><ahref="#mxRectangle.getPoint"id=link11onMouseOver="ShowTip(event, 'tt11', 'link11')"onMouseOut="HideTip('tt11')">getPoint</a></td><tdclass=SDescription>Returns the top, left corner as a new <ahref="mxPoint-js.html#mxPoint"class=LClassid=link12onMouseOver="ShowTip(event, 'tt1', 'link12')"onMouseOut="Hide
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxRectangle.mxRectangle"></a>mxRectangle</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>function mxRectangle(</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>width,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>height</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Constructs a new rectangle for the optional parameters. If no parameters are given then the respective default values are used.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxRectangle.width"></a>width</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxRectangle.prototype.width</td></tr></table></blockquote><p>Holds the width of the rectangle. Default is 0.</p></div></div></div>
<divclass="CVariable"><divclass=CTopic><h3class=CTitle><aname="mxRectangle.height"></a>height</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxRectangle.prototype.height</td></tr></table></blockquote><p>Holds the height of the rectangle. Default is 0.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxRectangle.getCenterX"></a>getCenterX</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxRectangle.prototype.getCenterX = function ()</td></tr></table></blockquote><p>Returns the x-coordinate of the center point.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxRectangle.getCenterY"></a>getCenterY</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxRectangle.prototype.getCenterY = function ()</td></tr></table></blockquote><p>Returns the y-coordinate of the center point.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxRectangle.add"></a>add</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxRectangle.prototype.add = function(</td><tdclass="PParameter prettyprint "nowrap>rect</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Adds the given rectangle to this rectangle.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxRectangle.intersect"></a>intersect</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxRectangle.prototype.intersect = function(</td><tdclass="PParameter prettyprint "nowrap>rect</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Changes this rectangle to where it overlaps with the given rectangle.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxRectangle.grow"></a>grow</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxRectangle.prototype.grow = function(</td><tdclass="PParameter prettyprint "nowrap>amount</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Grows the rectangle by the given amount, that is, this method subtracts the given amount from the x- and y-coordinates and adds twice the amount to the width and height.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxRectangle.getPoint"></a>getPoint</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxRectangle.prototype.getPoint = function()</td></tr></table></blockquote><p>Returns the top, left corner as a new <ahref="mxPoint-js.html#mxPoint"class=LClassid=link18onMouseOver="ShowTip(event, 'tt1', 'link18')"onMouseOut="HideTip('tt1')">mxPoint</a>.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxRectangle.rotate90"></a>rotate90</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxRectangle.prototype.rotate90 = function()</td></tr></table></blockquote><p>Rotates this rectangle by 90 degree around its center point.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxRectangle.equals"></a>equals</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxRectangle.prototype.equals = function(</td><tdclass="PParameter prettyprint "nowrap>obj</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns true if the given object equals this rectangle.</p></div></div></div>
<divclass="CFunction"><divclass=CTopic><h3class=CTitle><aname="mxRectangle.fromRectangle"></a>fromRectangle</h3><divclass=CBody><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxRectangle.fromRectangle = function(</td><tdclass="PParameter prettyprint "nowrap>rect</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>Returns a new <ahref="#mxRectangle.mxRectangle"class=LFunctionid=link19onMouseOver="ShowTip(event, 'tt2', 'link19')"onMouseOut="HideTip('tt2')">mxRectangle</a> which is a copy of the given rectangle.</p></div></div></div>
<divclass=CToolTipid="tt1"><divclass=CClass>Implements a 2-dimensional vector with double precision coordinates.</div></div><divclass=CToolTipid="tt2"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>function mxRectangle(</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>width,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>height</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Constructs a new rectangle for the optional parameters. </div></div><divclass=CToolTipid="tt3"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxRectangle.prototype.width</td></tr></table></blockquote>Holds the width of the rectangle. </div></div><divclass=CToolTipid="tt4"><divclass=CVariable><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxRectangle.prototype.height</td></tr></table></blockquote>Holds the height of the rectangle. </div></div><divclass=CToolTipid="tt5"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxRectangle.prototype.setRect = function(</td><tdclass="PParameter prettyprint "nowrap>x,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>y,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>w,</td></tr><tr><td></td><tdclass="PParameter prettyprint "nowrap>h</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Sets this rectangle to the specified values</div></div><divclass=CToolTipid="tt6"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxRectangle.prototype.getCenterX = function ()</td></tr></table></blockquote>Returns the x-coordinate of the center point.</div></div><divclass=CToolTipid="tt7"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><tdclass="prettyprint">mxRectangle.prototype.getCenterY = function ()</td></tr></table></blockquote>Returns the y-coordinate of the center point.</div></div><divclass=CToolTipid="tt8"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxRectangle.prototype.add = function(</td><tdclass="PParameter prettyprint "nowrap>rect</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Adds the given rectangle to this rectangle.</div></div><divclass=CToolTipid="tt9"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxRectangle.prototype.intersect = function(</td><tdclass="PParameter prettyprint "nowrap>rect</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Changes this rectangle to where it overlaps with the given rectangle.</div></div><divclass=CToolTipid="tt10"><divclass=CFunction><blockquote><tableborder=0cellspacing=0cellpadding=0class="Prototype"><tr><td><tableborder=0cellspacing=0cellpadding=0><tr><tdclass="PBeforeParameters prettyprint "nowrap>mxRectangle.prototype.grow = function(</td><tdclass="PParameter prettyprint "nowrap>amount</td><tdclass="PAfterParameters prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Grows the rectangle by the given amount, that is, this method subtracts the given amount