41 #define UI_RECT_EMPTY { 1u, 1u, 0u, 0u }
56 static inline ui_rect_t UI_RECT_get_minimum_bounding_rect_two_rects(
const ui_rect_t *first,
const ui_rect_t *second) {
57 return UI_RECT_new_xyxy(
MIN(first->x1, second->x1),
MIN(first->y1, second->y1),
MAX(first->x2, second->x2),
58 MAX(first->y2, second->y2));
81 uint32_t
UI_RECT_union(ui_rect_t output[3],
const ui_rect_t *first,
const ui_rect_t *second);
92 uint32_t
UI_RECT_subtract(ui_rect_t output[4],
const ui_rect_t *first,
const ui_rect_t *second);
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.
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.
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.
#define MIN(a, b)
Gets the lowest value.
#define MAX(a, b)
Gets the highest value.