Class GRectangle

This class encapsulates the location and dimensions of a rectangle.


Constructor Summary
GRectangle(x, y, width, height)
Constructs a new GRectangle with the specified coordinates and size.
 
Method Summary
getHeight()
Returns the height of this GRectangle.
getWidth()
Returns the width of this GRectangle.
getX()
Returns the x coordinate of this GRectangle.
getY()
Returns the y coordinate of this GRectangle.

Constructor Detail

GRectangle(x, y, width, height)

Constructs a new GRectangle with the specified coordinates and size.
Usage: rect = GRectangle(x, y, width, height) 
Parameters: 
 The x-coordinate of the rectangle
 The y-coordinate of the rectangle
width  The width of the rectangle
height  The height of the rectangle
 


Method Detail

getHeight()

Returns the height of this GRectangle.
Usage: height = rect.getHeight() 
Returns: The height of this GRectangle
 


getWidth()

Returns the width of this GRectangle.
Usage: width = rect.getWidth() 
Returns: The width of this GRectangle
 


getX()

Returns the x coordinate of this GRectangle.
Usage: x = rect.getX() 
Returns: The x coordinate of this GRectangle
 


getY()

Returns the y coordinate of this GRectangle.
Usage: y = rect.getY() 
Returns: The y coordinate of this GRectangle