#include <PtRect.h>
Public Attributes | |
Pt | ul |
Pt | lr |
Structors | |
Rect () | |
Rect (const Pt &pt1, const Pt &pt2) | |
Rect (X x1, Y y1, X x2, Y y2) | |
Accessors | |
X | Left () const |
X | Right () const |
Y | Top () const |
Y | Bottom () const |
Pt | UpperLeft () const |
Pt | LowerRight () const |
X | Width () const |
Y | Height () const |
bool | Contains (const Pt &pt) const |
Mutators | |
void | operator+= (const Pt &pt) |
void | operator-= (const Pt &pt) |
This is essentially just two points that bound the rectangle.
Definition at line 94 of file PtRect.h.
GG::Rect::Rect | ( | ) |
default ctor
ctor that constructs a Rect from two corners; any two opposing corners will do
ctor that constructs a Rect from its left, upper, right, and bottom boundaries
X GG::Rect::Left | ( | ) | const [inline] |
X GG::Rect::Right | ( | ) | const [inline] |
Y GG::Rect::Top | ( | ) | const [inline] |
Y GG::Rect::Bottom | ( | ) | const [inline] |
Pt GG::Rect::UpperLeft | ( | ) | const [inline] |
Pt GG::Rect::LowerRight | ( | ) | const [inline] |
X GG::Rect::Width | ( | ) | const [inline] |
Y GG::Rect::Height | ( | ) | const [inline] |
void GG::Rect::operator+= | ( | const Pt & | pt | ) | [inline] |
void GG::Rect::operator-= | ( | const Pt & | pt | ) | [inline] |
the upper-left corner of the Rect
Definition at line 120 of file PtRect.h.
Referenced by GG::operator+(), GG::operator-(), and GG::operator==().
the lower-right corner of the Rect
Definition at line 121 of file PtRect.h.
Referenced by GG::operator+(), GG::operator-(), and GG::operator==().