Extends mxPoint to implement a 2-dimensional rectangle with double precision coordinates.
mxRectangle | Extends mxPoint to implement a 2-dimensional rectangle with double precision coordinates. |
Functions | |
mxRectangle | Constructs a new rectangle for the optional parameters. |
Variables | |
width | Holds the width of the rectangle. |
height | Holds the height of the rectangle. |
Functions | |
setRect | Sets this rectangle to the specified values |
getCenterX | Returns the x-coordinate of the center point. |
getCenterY | Returns the y-coordinate of the center point. |
add | Adds the given rectangle to this rectangle. |
intersect | Changes this rectangle to where it overlaps with the given rectangle. |
grow | 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. |
getPoint | Returns the top, left corner as a new mxPoint. |
rotate90 | Rotates this rectangle by 90 degree around its center point. |
equals | Returns true if the given object equals this rectangle. |
fromRectangle | Returns a new mxRectangle which is a copy of the given rectangle. |
mxRectangle.prototype.getPoint = function()
Returns the top, left corner as a new mxPoint.
mxRectangle.fromRectangle = function( rect )
Returns a new mxRectangle which is a copy of the given rectangle.
Constructs a new rectangle for the optional parameters.
function mxRectangle( x, y, width, height )
Holds the width of the rectangle.
mxRectangle.prototype.width
Holds the height of the rectangle.
mxRectangle.prototype.height
Sets this rectangle to the specified values
mxRectangle.prototype.setRect = function( x, y, w, h )
Returns the x-coordinate of the center point.
mxRectangle.prototype.getCenterX = function ()
Returns the y-coordinate of the center point.
mxRectangle.prototype.getCenterY = function ()
Adds the given rectangle to this rectangle.
mxRectangle.prototype.add = function( rect )
Changes this rectangle to where it overlaps with the given rectangle.
mxRectangle.prototype.intersect = function( rect )
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.
mxRectangle.prototype.grow = function( amount )
Returns the top, left corner as a new mxPoint.
mxRectangle.prototype.getPoint = function()
Rotates this rectangle by 90 degree around its center point.
mxRectangle.prototype.rotate90 = function()
Returns true if the given object equals this rectangle.
mxRectangle.prototype.equals = function( obj )
Returns a new mxRectangle which is a copy of the given rectangle.
mxRectangle.fromRectangle = function( rect )