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