#include <qscoord.h>
Inheritance diagram for QSRectf:
Public Methods | |
QSRectf () | |
QSRectf (const QRect &r) | |
QSRectf (const QSPt2f &p2, const QSPt2f &p1, bool norm) | |
QSRectf (const QSPt2f &initPos, const QSPt2f &initSize) | |
QSRectf (double x, double y, double w, double h) | |
~QSRectf () | |
void | setP1 (const QSPt2f &p) |
void | setP2 (const QSPt2f &p) |
QSPt2f | p1 () const |
QSPt2f | p2 () const |
void | setTopLeft (const QSPt2f &p) |
void | setBottomRight (const QSPt2f &p) |
QSPt2f | topLeft () const |
QSPt2f | bottomRight () const |
bool | contains (const QSPt2f &pos) const |
void | unite (const QSRectf &rect) |
QSRectf | normalize () const |
QSRectf | normalizeWidth () const |
QSRectf | normalizeHeight () const |
QRect | rect () const |
Public Attributes | |
QSPt2f | pos |
QSPt2f | size |
Friends | |
bool | operator== (const QSRectf &r1, const QSRectf &r2) |
bool | operator!= (const QSRectf &r1, const QSRectf &r2) |
|
Constructor |
|
Constructor |
|
Constructor |
|
Constructor |
|
Constructor |
|
Destructor |
|
Returns coordinates of bottom-left corner ( the corner furthermost from (0,0) ) |
|
Returns if point is inside the rectangle |
|
Normalizes rectangle ( makes size > 0 ) |
|
Normalizes height ( makes it > 0 ) |
|
Normalizes width ( makes it > 0 ) |
|
Returns 'pos'. |
|
Returns 'pos'+'size' |
|
Rounds coordinates and converst rectangle to QRect. |
|
Sets bottom-right ( with maximum coordinates ) corner of this rectangle to 'p'. Never changes topLeft corner.. |
|
P1 is point at 'pos'. This function changes 'pos' and 'size' of this rectangle but never changes P2 |
|
P2 is the point at 'pos'+'size'. This function changes 'size' of this rectangle, but never changes 'size'. |
|
Sets top-left ( with minimal coordinates ) corner of this rectange. Doesnt change bottom-right corner. |
|
Returns coordinates of the top-left corner ( the corner closest to (0,0) ). |
|
Unites the rectangle with other rectangle. |
|
Position of this rectangle. |
|
Size of this rectangle. |