#include <guiDspDisplay.h>
Public Member Functions | |
tcRect () | |
tcRect (int x, int y, int w, int h) | |
tcRect (const tcPoint &p, const tcSize &s) | |
void | setRect (int x, int y, int w, int h) |
void | setCoords (int x1, int y1, int x2, int y2) |
bool | isNull () const |
bool | isEmpty () const |
bool | isValid () const |
int | x () const |
int | y () const |
int | w () const |
int | h () const |
int | left () const |
int | right () const |
int | top () const |
int | bottom () const |
void | offset (const tcPoint &p) |
void | inflate (const tcSize &s) |
void | deflate (const tcSize &s) |
tcRect | normalized () const |
bool | contains (int x, int y, bool border=true) const |
bool | quick_contains (int x, int y) const |
tcRect | operator| (const tcRect &r) const |
tcRect | operator& (const tcRect &r) const |
tcRect & | operator|= (const tcRect &r) |
tcRect & | operator&= (const tcRect &r) |
The tcRect class provides a logical rectangle representation of a screen area between two points (upper left corner and lower right corner).
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
tcRect tcRect::normalized | ( | ) | const |
Ensures that X1/X2 and Y1/Y2 coordinates are aligned in a positive increasing order. I.E., X2 > X1 and Y2 > Y1. First point is upper left and second point is bottom right (with 0,0 at "upper left"
bool tcRect::contains | ( | int | x, |
int | y, | ||
bool | border = true |
||
) | const |
Check if point contained in rectangle.
x | x position of point |
y | y position of point |
border | when true, include 1 pixel "pad" in check. |
|
inline |
Perform logical OR'ing of two rects.
Perform logical AND'ing of two rects.