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