thinkmap.geom.Rectangle
Represents a 2D Rectangle
Constructor
new Rectangle(
x,
y,
width,
height
)
Parameters:
the x coordinate, or a rectangle to clone
the x coordinate (required if first argument is a number)
the width (required if first argument is a number)
the height (required if first argument is a number)
The height of this rectangle.
The width of this rectangle.
The x coordinate of this rectangle's upper left hand corner
The y coordinate of this rectangle's upper left hand corner
Sets the frame (bounding box) of this rectangle to the union of this Rectangle
and the given rectangle.
Get the maximum x coordinate of this rectangle (x+width)
Returns:
number
the maximum x coordinate of this rectangle (x+width)
Get the maximum y coordinate of this rectangle (y+height)
Returns:
number
the maximum y coordinate of this rectangle (y+height)
Get the minimum x coordinate of this rectangle (x)
Returns:
number
the minimum x coordinate of this rectangle (x)
Get the minimum y coordinate of this rectangle (y)
Returns:
number
the minimum y coordinate of this rectangle (y)
Tests if this rectangle intersects the given rectangle.
Returns:
boolean
true if this rectangle intersects with the given rectangle
Returns true if this rectangle has a zero width or height
Sets the frame (bounding box) of this rectangle