2-dimensional integer rectangle. More...
#include <kanzi/core/math/rectangle.hpp>
Public Member Functions | |
T | getHeight () const |
Gets height. | |
T | getWidth () const |
Gets width. | |
T | getX () const |
Gets X offset. | |
T | getY () const |
Gets Y offset. | |
Rectangle () | |
Empty constructor. | |
Rectangle (T x, T y, T width, T height) | |
Constructor. | |
void | setHeight (T height) |
Sets height. | |
void | setWidth (T width) |
Sets width. | |
void | setX (T x) |
Sets X offset. | |
void | setY (T y) |
Sets Y offset. | |
Friends | |
bool | operator!= (const Rectangle< T > &lhs, const Rectangle< T > &rhs) |
Not equals operator. | |
bool | operator== (const Rectangle< T > &lhs, const Rectangle< T > &rhs) |
Equals operator. | |
2-dimensional integer rectangle.
The rectangle sizes remain non-negative for all operations as long as the input sizes are non-negative.
|
inlineexplicit |
Empty constructor.
|
inline |
Gets X offset.
|
inline |
Gets Y offset.
|
inline |
Gets width.
|
inline |
Gets height.
Sets X offset.
x | New offset. |
Sets Y offset.
y | New offset. |
Sets width.
width | New width. |
Sets height.
height | New height. |
Equals operator.
lhs | Left-hand-side operand of the comparison. |
rhs | Right-hand-side operand of the comparison. |
Not equals operator.
lhs | Left-hand-side operand of the comparison. |
rhs | Right-hand-side operand of the comparison. |