Stores a pair of numbers that represents the width and the height of a subject, typically a rectangle.
More...
#include <cvb/size_2d.hpp>
template<class T, class ENABLE = void>
class Cvb::Size2D< T, ENABLE >
Stores a pair of numbers that represents the width and the height of a subject, typically a rectangle.
- Template Parameters
-
T | The type of the numbers which is an integer or a floating-point number. |
◆ Size2D() [1/2]
Creates a default, empty size.
- Exceptions
-
Does | not throw any exception. |
◆ Size2D() [2/2]
Creates a size with a given width and height.
- Parameters
-
[in] | width | Horizontal component of the size. |
[in] | height | Vertical component of the size. |
- Exceptions
-
Does | not throw any exception. |
◆ Height()
Gets the vertical component of the size.
- Returns
- The vertical component.
- Exceptions
-
Does | not throw any exception. |
◆ operator!=()
bool operator!= |
( |
const Size2D< T > & |
size | ) |
const |
|
inlinenoexcept |
Compares to an other size.
- Parameters
-
- Returns
- True if not equal, otherwise false.
- Exceptions
-
Does | not throw any exception. |
◆ operator==()
bool operator== |
( |
const Size2D< T > & |
size | ) |
const |
|
inlinenoexcept |
Compares to an other size.
- Parameters
-
- Returns
- True if equal, otherwise false.
- Exceptions
-
Does | not throw any exception. |
◆ SetHeight()
void SetHeight |
( |
T |
height | ) |
|
|
inlinenoexcept |
Sets the vertical component of the size.
- Parameters
-
[in] | height | The vertical component. |
- Exceptions
-
Does | not throw any exception. |
◆ SetWidth()
Sets the horizontal component of the size.
- Parameters
-
[in] | width | The horizontal component. |
- Exceptions
-
Does | not throw any exception. |
◆ Width()
Gets the horizontal component of the size.
- Returns
- The horizontal component.
- Exceptions
-
Does | not throw any exception. |