A Size_2D holds 2-dimensional size information.
More...
#include <Dimensions.hh>
|
| | Size_2D () |
| | Constructs an empty 2D size.
|
| | Size_2D (const unsigned int &width, const unsigned int &height) |
| | Constructs a specific size.
|
| | Size_2D (const unsigned int &side) |
| | Constructs a size of equal width and height.
|
| | Size_2D (const Size_2D &size) |
| | Constructs a size from another size.
|
| Size_2D & | operator= (const Size_2D &size) |
| | Assign the size of another size to this size.
|
| unsigned int | width () const |
| | Get the width of the size.
|
| Size_2D & | width (const unsigned int &width) |
| | Set the width of the size.
|
| unsigned int | height () const |
| | Get the height of the size.
|
| Size_2D & | height (const unsigned int &height) |
| | Set the height of the size.
|
| unsigned long | area () const |
| | Get the area of this size.
|
|
| unsigned int | Width |
| | The width of the 2D size.
|
| unsigned int | Height |
| | The height of the 2D size.
|
A Size_2D holds 2-dimensional size information.
- Author
- Bradford Castalia, UA/PIRL
- Version
- 1.7
◆ Size_2D() [1/4]
Constructs an empty 2D size.
Both width and height are zero.
◆ Size_2D() [2/4]
| Size_2D |
( |
const unsigned int & | width, |
|
|
const unsigned int & | height ) |
Constructs a specific size.
- Parameters
-
| width | The width of the size. |
| height | The height of the size. |
◆ Size_2D() [3/4]
| Size_2D |
( |
const unsigned int & | side | ) |
|
Constructs a size of equal width and height.
- Parameters
-
| side | The length of each side. Both width and height will be set to this value. |
◆ Size_2D() [4/4]
Constructs a size from another size.
- Parameters
-
◆ operator=()
Assign the size of another size to this size.
- Parameters
-
| size | A Size_2D to have its values assigned to this size. |
◆ width() [1/2]
| unsigned int width |
( |
| ) |
const |
|
inline |
Get the width of the size.
- Returns
- The width of the size.
◆ width() [2/2]
| Size_2D & width |
( |
const unsigned int & | width | ) |
|
|
inline |
Set the width of the size.
- Parameters
-
| width | The width of the size. |
- Returns
- This Size_2D.
◆ height() [1/2]
| unsigned int height |
( |
| ) |
const |
|
inline |
Get the height of the size.
- Returns
- The height of the size.
◆ height() [2/2]
| Size_2D & height |
( |
const unsigned int & | height | ) |
|
|
inline |
Set the height of the size.
- Parameters
-
- Returns
- This Size_2D.
◆ area()
| unsigned long area |
( |
| ) |
const |
|
inline |
Get the area of this size.
- Returns
- The area (width * height) of the size.
◆ Width
The width of the 2D size.
◆ Height
The height of the 2D size.
The documentation for this struct was generated from the following files: