Rose
|
A size in integer dimensions. More...
#include <Types.h>
Public Member Functions | |
constexpr | Size (int W, int H) noexcept |
constexpr | Size (const Size &p)=default |
constexpr | Size (Size &&p)=default |
constexpr Size & | operator= (const Size &p)=default |
constexpr Size & | operator= (Size &&p)=default |
constexpr | Size (int size) noexcept |
constexpr | Size (const std::tuple< int, int > &size) noexcept |
constexpr Size & | operator= (std::tuple< int, int > &size) noexcept |
operator bool () const | |
bool | operator!= (const Size &other) const noexcept |
bool | operator== (const Size &other) const noexcept |
bool | operator< (const Size &other) const noexcept |
bool | operator<= (const Size &other) const noexcept |
bool | operator>= (const Size &other) const noexcept |
Size | operator+ (const Size &other) const noexcept |
Size | operator- (const Size &other) const noexcept |
Size | operator/ (const int divisor) const |
int & | primary (Orientation o) noexcept |
int & | secondary (Orientation o) noexcept |
constexpr int | primary (Orientation o) const noexcept |
constexpr int | secondary (Orientation o) const noexcept |
constexpr | Size (std::array< int, 2 > value) noexcept |
Constructor sets value to contents of an array. | |
constexpr | Size (int value=0) noexcept |
Default constructor initializes width and height to 0 or to a specified value. | |
constexpr | Size (int width, int height) noexcept |
Constructor sets value to descrete values. | |
constexpr | Size (const Size &)=default |
Copy constructor. | |
constexpr | Size (Size &&)=default |
Move constructor. | |
constexpr Size & | operator= (const Size &)=default |
Copy assignment. | |
constexpr Size & | operator= (Size &&)=default |
Move assignment. | |
constexpr | Size (const std::tuple< int, int > &t) noexcept |
constexpr Size & | operator= (const std::tuple< int, int > t) noexcept |
Copy assign tuple. | |
constexpr int & | width () |
Reference accessor for width. | |
constexpr int | width () const noexcept |
Value accessor for width. | |
constexpr int & | height () |
Reference accessor for height. | |
constexpr int | height () const noexcept |
Value accessor for height. | |
int & | primary (Orientation orientation) |
Reference for primary axis value. More... | |
constexpr int | primary (Orientation orientation) const noexcept |
Value for primary axis value. More... | |
int & | secondary (Orientation orientation) |
Reference for secondary axis value. More... | |
constexpr int | secondary (Orientation orientation) const noexcept |
Value for secondary axis value. More... | |
constexpr Size | operator+ (const Size &size) const noexcept |
Addition operator. | |
constexpr Size | operator- (const Size &size) const noexcept |
Subtraction operator. | |
Public Attributes | |
int | w {0} |
int | h {0} |
Static Public Attributes | |
static Size | Zero {} |
static const Size | Zero |
A zero size. | |
A size in integer dimensions.
The size of an object on the screen.
The width (w) is in the direction of the x axis, the height (h) is in the direction of the y axis.
|
inline |
Reference for primary axis value.
The primary access differs depending on the orientation
|
inlinenoexcept |
Value for primary axis value.
The primary access differs depending on the orientation
|
inline |
Reference for secondary axis value.
The secondary access differs depending on the orientation
|
inlinenoexcept |
Value for secondary axis value.
The secondary access differs depending on the orientation