#include <ShapeUpAPI.h>
Public Member Functions | |
SURectf () | |
SURectf (double _x1, double _y1, double _x2, double _y2) | |
void | Normalize () |
double | Width () const |
double | Height () const |
void | Inflate (const SUSizef &s) |
bool | Contains (const SUPointf &p) |
bool | Contains (double x, double y) const |
bool | Intersects (const SURectf &r) const |
Public Attributes | |
double | x1 |
double | y1 |
double | x2 |
double | y2 |
SURectf::SURectf | ( | ) | [inline] |
Default constructor.
SURectf::SURectf | ( | double | _x1, | |
double | _y1, | |||
double | _x2, | |||
double | _y2 | |||
) | [inline] |
void SURectf::Normalize | ( | ) | [inline] |
Arranges the rectangle to ensure x1 <= x2 and y1 <= y2.
double SURectf::Width | ( | ) | const [inline] |
Returns the width of this rectangle.
double SURectf::Height | ( | ) | const [inline] |
Returns the height of this rectangle.
void SURectf::Inflate | ( | const SUSizef & | s | ) | [inline] |
Increases the size of the rectangle with two times s (each side once).
bool SURectf::Contains | ( | const SUPointf & | p | ) | [inline] |
Returns true if the point p is contained within the rectangle, otherwise false.
bool SURectf::Contains | ( | double | x, | |
double | y | |||
) | const [inline] |
Returns true if the point at coordinate (x, y) is contained within the rectangle, otherwise false.
bool SURectf::Intersects | ( | const SURectf & | r | ) | const [inline] |
Returns true if the rectangle intersects the rectangle r, otherwise false.
double SURectf::x1 |
double SURectf::y1 |
double SURectf::x2 |
double SURectf::y2 |