2-dimensional integer rectangle. More...
#include <kanzi/core/math/rectangle.hpp>
Public Member Functions | |
Rectangle () | |
Empty constructor. More... | |
Rectangle (T x, T y, T width, T height) | |
Constructor. More... | |
T | getX () const |
Gets X offset. More... | |
T | getY () const |
Gets Y offset. More... | |
T | getWidth () const |
Gets width. More... | |
T | getHeight () const |
Gets height. More... | |
void | setX (T x) |
Sets X offset. More... | |
void | setY (T y) |
Sets Y offset. More... | |
void | setWidth (T width) |
Sets width. More... | |
void | setHeight (T height) |
Sets height. More... | |
Friends | |
bool | operator== (const Rectangle< T > &lhs, const Rectangle< T > &rhs) |
Equals operator. More... | |
bool | operator!= (const Rectangle< T > &lhs, const Rectangle< T > &rhs) |
Not equals operator. More... | |
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.
|
inlineexplicit |
Constructor.
|
inline |
Gets X offset.
|
inline |
Gets Y offset.
|
inline |
Gets width.
|
inline |
Gets height.
|
inline |
Sets X offset.
x | New offset. |
|
inline |
Sets Y offset.
y | New offset. |
|
inline |
Sets width.
width | New width. |
|
inline |
Sets height.
height | New height. |
|
friend |
Equals operator.
rhs | Right-hand-side operand of the comparison. |
|
friend |
Not equals operator.
rhs | Right-hand-side operand of the comparison. |