#include <urectangle.hpp>
Inheritance diagram for ufo::URectangle:
Public Member Functions | |
URectangle (int x, int y, int w, int h) | |
URectangle (const UPoint &p, const UDimension &d) | |
URectangle (const UPoint &p1, const UPoint &p2) | |
URectangle (const UDimension &d) | |
UPoint | getLocation () const |
UDimension | getSize () const |
void | setBounds (int x, int y, int w, int h) |
void | setBounds (const URectangle &rect) |
bool | contains (const UPoint &pos) const |
bool | isValid () const |
bool | isInvalid () const |
bool | isEmpty () const |
void | clamp (const UDimension &maxDim) |
void | expand (const UDimension &minDim) |
void | intersect (const URectangle &rect) |
void | unite (const URectangle &rect) |
URectangle | computeUnion (const URectangle &src) const |
bool | operator() () const |
bool | operator! () const |
URectangle & | operator+= (const UPoint &p) |
URectangle & | operator-= (const UPoint &p) |
URectangle & | operator+= (const UDimension &dim) |
URectangle & | operator-= (const UDimension &dim) |
URectangle & | operator+= (const UInsets &insets) |
URectangle & | operator-= (const UInsets &insets) |
Static Public Member Functions | |
URectangle * | computeUnion (const URectangle &src1, const URectangle &src2, URectangle *dest) |
Public Attributes | |
int | x |
int | y |
int | w |
int | h |
Static Public Attributes | |
URectangle | invalid |
Friends | |
std::ostream & | operator<< (std::ostream &os, const URectangle &o) |
This class is not part of the UObject inheritance structure. Use instead URectangleObject if you need a rectangle derived from UObject.
|
Computes a rectangle between two points. |
|
Creates a rectangle with locatin 0,0 and the given size. |
|
Clamps this URectangle to have at most the dimension of the given |
|
computes the rectangle that contains both src rectangles and saves the values in the dest rectangle within creating a new one. It is allowed to use one source rectangle as dest rectangle, e.g.
|
|
|
|
|
|
Expands this URectangle to have at least the dimension of the given |
|
Intersects this rectangle with the given rectangle |
|
|
|
|
|
|
|
|
|
|
|
Increases this rectangle using the given insets
|
|
Increases this rectangle using the given dimension
|
|
Moves this rectangle using the coordinates of the given point
|
|
Shrinks this rectangle using the given insets
|
|
Shrinks this rectangle using the given dimension
|
|
Moves this rectangle using the coordinates of the given point
|
|
Unites this rectangle with the given rectangle.
|