62 static uint16_t
my_max(uint16_t a,uint16_t b);
65 static uint16_t
my_min(uint16_t a,uint16_t b);
Representation of a size, i.e.
Definition: UISize.h:9
uint16_t width
Width.
Definition: UISize.h:30
uint16_t height
Height.
Definition: UISize.h:33
void maxWidthCumulateHeight(UISize *other)
Cumulate the heights of this and the other size and take the maximum of both widths,...
Definition: UISize.cpp:30
void cumulateBoth(UISize *other)
Cumulate width and height of this and the referenced size into this size.
Definition: UISize.cpp:25
bool isEmpty()
Return true if this size is empty, i.e.
Definition: UISize.cpp:52
UISize()
Initialize a size without width or height (both 0).
Definition: UISize.cpp:19
static const UISize MAX_SIZE
UISize representing maximal size in all directions.
Definition: UISize.h:15
static const UISize EMPTY
UISize representing an empty size (both directions 0)
Definition: UISize.h:18
void shrinkTo(UISize *other)
Shrink this so that neither width nor height is larger than the one of other.
Definition: UISize.cpp:45
static uint16_t my_max(uint16_t a, uint16_t b)
Static helper method: maximum of two given uint16_t fields.
Definition: UISize.cpp:57
void set(uint16_t width, uint16_t height)
Set height from a numeric width and height.
Definition: UISize.cpp:21
static uint16_t my_min(uint16_t a, uint16_t b)
Static helper method: maximum of two given uint16_t fields.
Definition: UISize.cpp:62
void maxBoth(UISize *other)
Take the maximum of widths and height of this and the other size and write it into this.
Definition: UISize.cpp:40
static const uint16_t MAX_LEN
Less than half of max value so that addition of two does not overflow.
Definition: UISize.h:12
void cumulateWidthMaxHeight(UISize *other)
Cumulate the widths of this and the other size and take the maximum of both heights,...
Definition: UISize.cpp:35
void debugPrint(const char *label)
Debug output of this size with some prepended label.
Definition: UISize.cpp:71
static uint16_t max_len_or(uint16_t a)
Static helper method: restrict given value to MAX_LEN at most.
Definition: UISize.cpp:67