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