Definition
An instance ir of type IRect is a rectangle (left, right, top, bottom) in a grid coordinate system. That is left < = right and bottom < = top.
#include < AGD/IRect.h >
Creation
IRect | ir | creates an instance ir of type IRect initialized to the rectangle (0, 0, 0, 0). |
IRect | ir(int xmin, int xmax, int ymin, int ymax) | |
creates an instance ir of type IRect initialized to the rectangle (xmin, xmax, ymin, ymax). | ||
IRect | ir(const IPoint& ll, const IPoint& ur) | |
creates an instance ir of type IRect initialized to the rectangle with lower left corner ll and upper right corner ur. |
Operations
IPoint | ir.lower_left() | returns the lower left corner of ir. |
IPoint | ir.upper_right() | returns the upper right corner of ir. |
const int& | ir.left() | returns the x-coordinate of the lower left corner of ir. |
const int& | ir.right() | returns the x-coordinate of the upper right corner of ir. |
const int& | ir.top() | returns the y-coordinate of the upper right corner of ir. |
const int& | ir.bottom() | returns the y-coordinate of the lower left corner of ir. |
int | ir.width() | returns the width (= right - left) of ir. |
int | ir.height() | returns the height (= top - bottom) of ir. |
int | ir.area() | returns the area (= width()*height()) of ir. |
© Copyright 1998-2001, Algorithmic Solutions Software GmbH. All rights reserved.
2001-08-13