|
UiUiUi
A user interface library for micro controller sketches based on U8g2
|
Representation of a size, i.e. More...
#include <UISize.h>

Public Member Functions | |
| UISize (uint16_t width, uint16_t height) | |
| Initialize a size from a width and a height. | |
| UISize (UISize *other) | |
| Initialize a size from another size. | |
| UISize () | |
| Initialize a size without width or height (both 0). | |
| void | set (uint16_t width, uint16_t height) |
| Set height from a numeric width and height. | |
| void | set (UISize *other) |
| Set size from another referenced height. | |
| void | cumulateBoth (UISize *other) |
| Cumulate width and height of this and the referenced size into this size. | |
| void | maxWidthCumulateHeight (UISize *other) |
| Cumulate the heights of this and the other size and take the maximum of both widths, write everything into this. | |
| void | cumulateWidthMaxHeight (UISize *other) |
| Cumulate the widths of this and the other size and take the maximum of both heights, write everything into this. | |
| void | maxBoth (UISize *other) |
| Take the maximum of widths and height of this and the other size and write it into this. | |
| void | shrinkTo (UISize *other) |
| Shrink this so that neither width nor height is larger than the one of other. | |
| bool | isEmpty () |
| Return true if this size is empty, i.e. More... | |
| void | debugPrint (const char *label) |
| Debug output of this size with some prepended label. | |
Public Attributes | |
| uint16_t | width |
| Width. | |
| uint16_t | height |
| Height. | |
Static Public Attributes | |
| static const uint16_t | MAX_LEN =32767 |
| Less than half of max value so that addition of two does not overflow. More... | |
| static const UISize | MAX_SIZE |
| UISize representing maximal size in all directions. | |
| static const UISize | EMPTY |
| UISize representing an empty size (both directions 0) | |
Representation of a size, i.e.
a width and a height.
| bool UISize::isEmpty | ( | ) |
Return true if this size is empty, i.e.
it has neither width nor height, i.e. both are 0.
|
static |
Less than half of max value so that addition of two does not overflow.
Representation of a size, i.e.
a width and a height.