GRect 代表二维平面中的一个矩形区域。对二维平面上的一个矩形区域进行各种数学运算。 更多...
#include <gRect.h>
Public 成员函数 | |
GRect () | |
GRect (const GPoint &topleft, const GSize &size) | |
GRect (T_OFFSET left, T_OFFSET top, T_OFFSET width, T_OFFSET height) | |
GRect (const T_RECT &tr) | |
bool | isNull () const |
bool | isEmpty () const |
bool | isValid () const |
T_OFFSET | left () const |
T_OFFSET | top () const |
T_OFFSET | right () const |
T_OFFSET | bottom () const |
T_OFFSET | x () const |
T_OFFSET | y () const |
GSize | size () const |
T_OFFSET | width () const |
T_OFFSET | height () const |
void | setWidth (T_OFFSET w) |
void | setHeight (T_OFFSET h) |
void | setSize (const GSize &s) |
void | translate (T_OFFSET dx, T_OFFSET dy) |
void | translate (const GPoint &p) |
void | moveBy (T_OFFSET dx, T_OFFSET dy) |
void | moveBy (const GPoint &p) |
void | moveTopLeft (const GPoint &p) |
void | setRect (T_OFFSET x, T_OFFSET y, T_OFFSET w, T_OFFSET h) |
GRect | intersect (const GRect &r) const |
bool | intersects (const GRect &r) const |
GPoint | topLeft () const |
GPoint | bottomLeft () const |
GPoint | topRight () const |
GPoint | bottomRight () const |
GPoint | center () const |
void | moveLeft (T_OFFSET pos) |
void | moveRight (T_OFFSET pos) |
void | moveTop (T_OFFSET pos) |
void | moveBottom (T_OFFSET pos) |
bool | contains (const GRect &r, bool proper=false) const |
bool | contains (const GPoint &p, bool proper=false) const |
GRect | operator& (const GRect &r) const |
void | setLeft (T_OFFSET pos) |
void | setTop (T_OFFSET pos) |
void | setRight (T_OFFSET pos) |
void | setBottom (T_OFFSET pos) |
const T_RECT | toT_RECT () const |
友元 | |
bool | operator== (const GRect &, const GRect &) |
GRect 代表二维平面中的一个矩形区域。对二维平面上的一个矩形区域进行各种数学运算。
GRect::GRect | ( | ) |
GRect::GRect | ( | const T_RECT & | tr | ) |
T_OFFSET GRect::bottom | ( | ) | const |
GPoint GRect::bottomLeft | ( | ) | const |
GPoint GRect::bottomRight | ( | ) | const |
GPoint GRect::center | ( | ) | const |
bool GRect::contains | ( | const GRect & | r, |
bool | proper = false |
||
) | const |
bool GRect::contains | ( | const GPoint & | p, |
bool | proper = false |
||
) | const |
T_OFFSET GRect::height | ( | ) | const |
bool GRect::intersects | ( | const GRect & | r | ) | const |
bool GRect::isEmpty | ( | ) | const |
bool GRect::isNull | ( | ) | const |
bool GRect::isValid | ( | ) | const |
T_OFFSET GRect::left | ( | ) | const |
void GRect::moveBottom | ( | T_OFFSET | pos | ) |
void GRect::moveBy | ( | const GPoint & | p | ) |
void GRect::moveLeft | ( | T_OFFSET | pos | ) |
void GRect::moveRight | ( | T_OFFSET | pos | ) |
void GRect::moveTop | ( | T_OFFSET | pos | ) |
void GRect::moveTopLeft | ( | const GPoint & | p | ) |
T_OFFSET GRect::right | ( | ) | const |
void GRect::setBottom | ( | T_OFFSET | pos | ) |
void GRect::setHeight | ( | T_OFFSET | h | ) |
void GRect::setLeft | ( | T_OFFSET | pos | ) |
void GRect::setRight | ( | T_OFFSET | pos | ) |
void GRect::setSize | ( | const GSize & | s | ) |
void GRect::setTop | ( | T_OFFSET | pos | ) |
void GRect::setWidth | ( | T_OFFSET | w | ) |
GSize GRect::size | ( | ) | const |
T_OFFSET GRect::top | ( | ) | const |
GPoint GRect::topLeft | ( | ) | const |
GPoint GRect::topRight | ( | ) | const |
const T_RECT GRect::toT_RECT | ( | ) | const |
void GRect::translate | ( | const GPoint & | p | ) |
T_OFFSET GRect::width | ( | ) | const |
T_OFFSET GRect::x | ( | ) | const |
T_OFFSET GRect::y | ( | ) | const |