mxRectangle

Extends mxPoint to implement a 2-dimensional rectangle with double precision coordinates.

Summary
mxRectangleExtends mxPoint to implement a 2-dimensional rectangle with double precision coordinates.
Functions
mxRectangleConstructs a new rectangle for the optional parameters.
Variables
widthHolds the width of the rectangle.
heightHolds the height of the rectangle.
Functions
setRectSets this rectangle to the specified values
getCenterXReturns the x-coordinate of the center point.
getCenterYReturns the y-coordinate of the center point.
addAdds the given rectangle to this rectangle.
growGrows 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.
getPointReturns the top, left corner as a new mxPoint.
equalsReturns true if the given object equals this rectangle.

Functions

mxRectangle

function mxRectangle(x,
y,
width,
height)

Constructs a new rectangle for the optional parameters.  If no parameters are given then the respective default values are used.

Variables

width

mxRectangle.prototype.width

Holds the width of the rectangle.  Default is 0.

height

mxRectangle.prototype.height

Holds the height of the rectangle.  Default is 0.

Functions

setRect

mxRectangle.prototype.setRect = function(x,
y,
w,
h)

Sets this rectangle to the specified values

getCenterX

mxRectangle.prototype.getCenterX = function ()

Returns the x-coordinate of the center point.

getCenterY

mxRectangle.prototype.getCenterY = function ()

Returns the y-coordinate of the center point.

add

mxRectangle.prototype.add = function(rect)

Adds the given rectangle to this rectangle.

grow

mxRectangle.prototype.grow = function(amount)

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

mxRectangle.prototype.getPoint = function()

Returns the top, left corner as a new mxPoint.

equals

mxRectangle.prototype.equals = function(obj)

Returns true if the given object equals this rectangle.

Implements a 2-dimensional vector with double precision coordinates.
function mxRectangle(x,
y,
width,
height)
Constructs a new rectangle for the optional parameters.
mxRectangle.prototype.width
Holds the width of the rectangle.
mxRectangle.prototype.height
Holds the height of the rectangle.
mxRectangle.prototype.setRect = function(x,
y,
w,
h)
Sets this rectangle to the specified values
mxRectangle.prototype.getCenterX = function ()
Returns the x-coordinate of the center point.
mxRectangle.prototype.getCenterY = function ()
Returns the y-coordinate of the center point.
mxRectangle.prototype.add = function(rect)
Adds the given rectangle to this rectangle.
mxRectangle.prototype.grow = function(amount)
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.getPoint = function()
Returns the top, left corner as a new mxPoint.
mxRectangle.prototype.equals = function(obj)
Returns true if the given object equals this rectangle.
Close