C
SafeRenderer::QSafeRect Struct
struct SafeRenderer::QSafeRectThe QSafeRect class defines a rectangle in the plane. More...
Header: | #include <QSafeRect> |
Since: | QtSafeRenderer 2.0 |
Public Functions
QSafeRect() | |
QSafeRect(const SafeRenderer::QSafePoint &topLeftArg, const SafeRenderer::QSafeSize &sizeArg) | |
QSafeRect(const SafeRenderer::quint32 xArg, const SafeRenderer::quint32 yArg, const SafeRenderer::quint32 widthArg, const SafeRenderer::quint32 heightArg) | |
SafeRenderer::quint32 | height() const |
void | setHeight(const SafeRenderer::quint32 heightArg) |
void | setWidth(const SafeRenderer::quint32 widthArg) |
void | setX(const SafeRenderer::quint32 xArg) |
void | setY(const SafeRenderer::quint32 yArg) |
SafeRenderer::quint32 | width() const |
SafeRenderer::quint32 | x() const |
SafeRenderer::quint32 | y() const |
Static Public Members
bool | equals(const SafeRenderer::QSafeRect &firstRect, const SafeRenderer::QSafeRect &secondRect) |
bool | intersects(const SafeRenderer::QSafeRect &firstRect, const SafeRenderer::QSafeRect &secondRect) |
SafeRenderer::QSafeRect | united(const SafeRenderer::QSafeRect &firstRect, const SafeRenderer::QSafeRect &secondRect) |
Detailed Description
The QSafeRect class holds the x, y, height and width variables. The QSafeRect class also provides the intersects() function which returns true if two rectangles intersects, and the united() function which returns the rectangle that encloses the two given rectangles.
Member Function Documentation
QSafeRect::QSafeRect()
Constructs a default safe size object. The x, y, width and height values are set to 0.
QSafeRect::QSafeRect(const SafeRenderer::QSafePoint &topLeftArg, const SafeRenderer::QSafeSize &sizeArg)
Constructs a rectangle with the given topLeftArg and sizeArg.
QSafeRect::QSafeRect(const SafeRenderer::quint32 xArg, const SafeRenderer::quint32 yArg, const SafeRenderer::quint32 widthArg, const SafeRenderer::quint32 heightArg)
Constructs a rectangle with (xArg, yArg) as its top-left corner and the given widthArg and heightArg.
[static]
bool QSafeRect::equals(const SafeRenderer::QSafeRect &firstRect, const SafeRenderer::QSafeRect &secondRect)
Returns true if firstRect and secondRect are equal, otherwise returns false.
SafeRenderer::quint32 QSafeRect::height() const
Returns the height.
See also setHeight().
[static]
bool QSafeRect::intersects(const SafeRenderer::QSafeRect &firstRect, const SafeRenderer::QSafeRect &secondRect)
Returns true if firstRect intersects with secondRect (that is, there is at least one pixel within both rectangles), otherwise returns false.
void QSafeRect::setHeight(const SafeRenderer::quint32 heightArg)
Sets the height to heightArg.
See also height().
void QSafeRect::setWidth(const SafeRenderer::quint32 widthArg)
Sets the width to widthArg.
See also width().
void QSafeRect::setX(const SafeRenderer::quint32 xArg)
Sets the x to xArg.
See also x().
void QSafeRect::setY(const SafeRenderer::quint32 yArg)
Sets the y to yArg.
See also y().
[static]
SafeRenderer::QSafeRect QSafeRect::united(const SafeRenderer::QSafeRect &firstRect, const SafeRenderer::QSafeRect &secondRect)
Returns the bounding rectangle of firstRect and secondRect.
SafeRenderer::quint32 QSafeRect::width() const
Returns the width.
See also setWidth().
SafeRenderer::quint32 QSafeRect::x() const
Returns the x.
See also setX().
SafeRenderer::quint32 QSafeRect::y() const
Returns the y.
See also setY().
Available under certain Qt licenses.
Find out more.