Dimension.
More...
#include <base/Dimension.h>
Dimension.
Dimension represented by width and height.
- Version
- 1.2
◆ Dimension() [1/3]
Initializes object with width and height set to zero.
◆ Dimension() [2/3]
Dimension::Dimension |
( |
unsigned int |
width, |
|
|
unsigned int |
height |
|
) |
| |
|
inlinenoexcept |
Initializes object with the specified width and height.
- Parameters
-
width | The desired width. |
height | The desired height. |
◆ Dimension() [3/3]
Dimension::Dimension |
( |
const Dimension & |
copy | ) |
|
|
inlinenoexcept |
Initializes object with the dimension copied from the specified dimension.
- Parameters
-
dimension | The desired dimension. |
◆ assign()
void Dimension::assign |
( |
unsigned int |
width, |
|
|
unsigned int |
height |
|
) |
| |
|
inlinenoexcept |
Sets the width and the height.
- Parameters
-
width | The desired width. |
height | The desired height. |
◆ expand()
void Dimension::expand |
( |
const Dimension & |
dimension | ) |
|
|
inlinenoexcept |
Expands the width and height to the maximum value of this and the specified dimension.
- Parameters
-
dimension | The other dimension. |
◆ getHeight()
unsigned int Dimension::getHeight |
( |
| ) |
const |
|
inlinenoexcept |
◆ getSize()
unsigned long long Dimension::getSize |
( |
| ) |
const |
|
inlinenoexcept |
Returns the size (width * height).
◆ getWidth()
unsigned int Dimension::getWidth |
( |
| ) |
const |
|
inlinenoexcept |
◆ isProper()
bool Dimension::isProper |
( |
| ) |
const |
|
inlinenoexcept |
Returns true if the dimension is proper (i.e. both the width and height are non-zero).
◆ operator!=()
bool Dimension::operator!= |
( |
const Dimension & |
dimension | ) |
const |
|
inlinenoexcept |
Returns true if the dimensions are different.
- Parameters
-
dimension | The dimension to be compared. |
◆ operator=()
Assigns the dimension.
- Parameters
-
dimension | The desired dimension. |
◆ operator==()
bool Dimension::operator== |
( |
const Dimension & |
dimension | ) |
const |
|
inlinenoexcept |
Returns true if the dimensions are equal.
- Parameters
-
dimension | The dimension to be compared. |
◆ reduce()
void Dimension::reduce |
( |
const Dimension & |
dimension | ) |
|
|
inlinenoexcept |
Reduces the width and height to the minimum values of this and the specified dimension.
- Parameters
-
dimension | The other dimension. |
◆ setHeight()
void Dimension::setHeight |
( |
unsigned int |
value | ) |
|
|
inlinenoexcept |
Sets the height.
- Parameters
-
◆ setWidth()
void Dimension::setWidth |
( |
unsigned int |
value | ) |
|
|
inlinenoexcept |
Sets the width.
- Parameters
-
◆ height
unsigned int Dimension::height = 0 |
|
protected |
◆ width
unsigned int Dimension::width = 0 |
|
protected |