#include <Wt/WRectF>
Public Member Functions | |
| WRectF () | |
| Default constructor. | |
| WRectF (double x, double y, double width, double height) | |
| Construct a rectangle. | |
| WRectF (const WPointF &topLeft, const WPointF &bottomRight) | |
| Construct a rectangle. | |
| bool | isNull () const |
| Checks for a null rectangle. | |
| void | setX (double x) |
| Changes the X-position of the left side. | |
| void | setY (double y) |
| Changes the Y-position of the top side. | |
| void | setWidth (double width) |
| Changes the width. | |
| void | setHeight (double height) |
| Changes the Y-position of the top side. | |
| double | x () const |
| Returns the X-position of the left side. | |
| double | y () const |
| Returns the Y-position of the top side. | |
| double | width () const |
| Returns the width. | |
| double | height () const |
| Returns the height. | |
| double | left () const |
| Returns the X position of the left side. | |
| double | top () const |
| Returns the Y position of the top side. | |
| double | right () const |
| Returns the X position of the right side. | |
| double | bottom () const |
| Returns the Y position of the bottom side. | |
| WPointF | topLeft () const |
| Returns the top left point. | |
| WPointF | topRight () const |
| Returns the top right point. | |
| WPointF | center () const |
| Returns the center point. | |
| WPointF | bottomLeft () const |
| Returns the bottom left point. | |
| WPointF | bottomRight () const |
| Returns the bottom right point. | |
| bool | intersects (const WRectF &other) const |
| Tests if two rectangles intersect. | |
| WRectF | united (const WRectF &other) const |
| Makes the union of to rectangles. | |
The rectangle is defined by a top-left point and a width and height.
| Wt::WRectF::WRectF | ( | ) |
| Wt::WRectF::WRectF | ( | double | x, | |
| double | y, | |||
| double | width, | |||
| double | height | |||
| ) |
Construct a rectangle.
Constructs a rectangle with top left point (x, y) and size width x height.
Construct a rectangle.
Constructs a rectangle from the two points topLeft and bottomRight.
| bool Wt::WRectF::isNull | ( | ) | const |
| void Wt::WRectF::setX | ( | double | x | ) |
Changes the X-position of the left side.
The right side of the rectangle does not move, and as a result, the rectangle may be resized.
| void Wt::WRectF::setY | ( | double | y | ) |
Changes the Y-position of the top side.
The bottom side of the rectangle does not move, and as a result, the rectangle may be resized.
| void Wt::WRectF::setWidth | ( | double | width | ) | [inline] |
Changes the width.
The right side of the rectangle may move, but does not change the X position of the left side.
| void Wt::WRectF::setHeight | ( | double | height | ) | [inline] |
Changes the Y-position of the top side.
The bottom side of the rectangle may move, but does not change the Y position of the top side.
| double Wt::WRectF::x | ( | ) | const [inline] |
| double Wt::WRectF::y | ( | ) | const [inline] |
| double Wt::WRectF::width | ( | ) | const [inline] |
| double Wt::WRectF::height | ( | ) | const [inline] |
| double Wt::WRectF::left | ( | ) | const [inline] |
| double Wt::WRectF::top | ( | ) | const [inline] |
| double Wt::WRectF::right | ( | ) | const [inline] |
| double Wt::WRectF::bottom | ( | ) | const [inline] |
| WPointF Wt::WRectF::bottomRight | ( | ) | const |
1.5.6