Implements a 2-dimensional rectangle with double precision coordinates.
mxRectangle | Implements a 2-dimensional rectangle with double precision coordinates. |
Variables | |
width | Holds the width of the rectangle. |
height | Holds the height of the rectangle. |
Functions | |
mxRectangle | Constructs a new rectangle for the optional parameters. |
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. |
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. |
equals | Returns true if the given object equals this rectangle. |
copy | Returns a copy of this mxRectangle. |
function copy()
Returns a copy of this mxRectangle.
Holds the width of the rectangle.
var $width
Holds the height of the rectangle.
var $height
Constructs a new rectangle for the optional parameters.
function mxRectangle( $x = 0, $y = 0, $width = 0, $height = 0 )
Sets this rectangle to the specified values.
function setRect( $x, $y, $width, $height )
Returns the x-coordinate of the center point.
function getCenterX()
Returns the y-coordinate of the center point.
function getCenterY()
Adds the given rectangle to this rectangle.
function add( $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.
function grow( $amount )
Returns true if the given object equals this rectangle.
function equals( $obj )
Returns a copy of this mxRectangle.
function copy()