Class List

Class Rectangle

The Rectangle object is an area defined by its position.

Class Summary
Constructor Attributes Constructor Name and Description
 
Constructor.
Field Summary
Field Attributes Field Name and Description
 
The height of the rectangle.
 
The width of the rectangle.
 
x
The horizontal coordinate of the rectangle.
 
y
The vertical coordinate of the rectangle.
Method Summary
Method Attributes Method Name and Description
 
Creates a copy of this Rectangle object.
 
Checks this rectangle whether contains the point parameter.
 
Computes the intersection of this rectangle and the rectangle parameter.
 
intersects(rect)
Returns whether this rectangle intersects the rectangle parameter.
 
Returns a string that represent this Rectangle object.
Class Detail
Rectangle()
Constructor.
Field Detail
height
The height of the rectangle.

width
The width of the rectangle.

x
The horizontal coordinate of the rectangle.

y
The vertical coordinate of the rectangle.
Method Detail
clone()
Creates a copy of this Rectangle object.

containsPoint(x, y)
Checks this rectangle whether contains the point parameter.
Parameters:
x
y

intersection(rect)
Computes the intersection of this rectangle and the rectangle parameter.
Parameters:
rect
A Rectangle.

intersects(rect)
Returns whether this rectangle intersects the rectangle parameter.
Parameters:
rect
A Rectangle.

toString()
Returns a string that represent this Rectangle object.

Documentation generated by JsDoc Toolkit 2.4.0 on Mon Jul 25 2011 15:02:39 GMT+0800 (CST)