#include <box2.h>
Public Member Functions |
|
Box2 () | |
Box2 (const IPoint2 a, const IPoint2 b) | |
int | IsEmpty () |
void | SetEmpty () |
void | Rectify () |
void | Scale (float f) |
void | Translate (IPoint2 t) |
IPoint2 | GetCenter () |
int | x () |
int | y () |
int | w () |
int | h () |
void | SetW (int w) |
void | SetH (int h) |
void | SetX (int x) |
void | SetY (int y) |
void | SetWH (int w, int h) |
void | SetXY (int x, int y) |
Box2 & | operator= (const RECT &r) |
Box2 & | operator= (RECT &r) |
Box2 & | operator+= (const Box2 &b) |
Box2 & | operator+= (const IPoint2 &p) |
int | operator== (const Box2 &b) const |
int | Contains (const IPoint2 &p) const |
Box2 | ( | ) |
int IsEmpty | ( | ) |
void SetEmpty | ( | ) |
void Rectify | ( | ) |
void Scale | ( | float | f | ) |
void Translate | ( | IPoint2 | t | ) |
IPoint2 GetCenter | ( | ) | [inline] |
{ return IPoint2((left+right)/2, (top+bottom)/2); }
int x | ( | ) | [inline] |
{ return ((left < right) ? left : right); }
int y | ( | ) | [inline] |
{ return ((top < bottom) ? top : bottom); }
int w | ( | ) | [inline] |
int h | ( | ) | [inline] |
void SetW | ( | int | w | ) | [inline] |
{ right = left + w -1; }
void SetH | ( | int | h | ) | [inline] |
{ bottom = top + h -1; }
void SetX | ( | int | x | ) | [inline] |
{ left = x; }
void SetY | ( | int | y | ) | [inline] |
{ top = y; }
void SetWH | ( | int | w, |
int | h | ||
) | [inline] |
void SetXY | ( | int | x, |
int | y | ||
) | [inline] |
Box2& operator= | ( | const RECT & | r | ) |
Box2& operator= | ( | RECT & | r | ) |
int operator== | ( | const Box2 & | b | ) | const [inline] |
{ return (left==b.left && right==b.right && top==b.top && bottom==b.bottom); }
int Contains | ( | const IPoint2 & | p | ) | const |