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
get_height()
Returns the height of this GRectangle.
get_width()
Returns the width of this GRectangle.
get_x()
Returns the x coordinate of this GRectangle.
get_y()
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

get_height()

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


get_width()

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


get_x()

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


get_y()

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