![]() |
microui
14.5.5
microui
|
Utility functions to handle rectangles. More...
Go to the source code of this file.
Macros | |
| #define | UI_RECT_EMPTY { 1u, 1u, 0u, 0u } |
| The initializer of an empty rectangle: its end (x2,y2) is before its start (x1,y1). | |
Functions | |
| ui_rect_t | UI_RECT_get_minimum_bounding_rect (const ui_rect_t rects[], const size_t count) |
| Computes the minimum bounding rectangle of an array of rectangles. More... | |
| uint32_t | UI_RECT_union (ui_rect_t output[3], const ui_rect_t *first, const ui_rect_t *second) |
| Computes the union of two rectangles. More... | |
| uint32_t | UI_RECT_subtract (ui_rect_t output[4], const ui_rect_t *first, const ui_rect_t *second) |
| Computes the difference between two rectangles. More... | |
Utility functions to handle rectangles.
Definition in file ui_rect_util.h.
| ui_rect_t UI_RECT_get_minimum_bounding_rect | ( | const ui_rect_t | rects[], |
| const size_t | count | ||
| ) |
Computes the minimum bounding rectangle of an array of rectangles.
The behavior is undefined if the array is empty.
| [in] | rects | the array of rectangles |
| [in] | count | the length of the array |
Definition at line 32 of file ui_rect_util.c.
| uint32_t UI_RECT_subtract | ( | ui_rect_t | output[4], |
| const ui_rect_t * | first, | ||
| const ui_rect_t * | second | ||
| ) |
Computes the difference between two rectangles.
| [out] | output | the rectangles defining the difference between the parameters |
| [in] | first | the original rectangle |
| [in] | second | the rectangle that will be removed from the original one |
Definition at line 89 of file ui_rect_util.c.
| uint32_t UI_RECT_union | ( | ui_rect_t | output[3], |
| const ui_rect_t * | first, | ||
| const ui_rect_t * | second | ||
| ) |
Computes the union of two rectangles.
| [out] | output | rectangles defining the union of the parameters |
| [in] | first | the first rectangle |
| [in] | second | the second rectangle |
Definition at line 42 of file ui_rect_util.c.
1.9.1