38 *out_x = rect->
x + (int32_t)pad;
39 *out_y = rect->
y + (int32_t)pad;
43 if (paint->text_size ==
nullptr) {
48 paint->text_size(paint->user, text, &tw, &th);
49 *out_y = rect->
y + ((rect->
h - th) / 2);
51 *out_x = (rect->
x + rect->
w) - (int32_t)pad - tw;
54 *out_x = rect->
x + ((rect->
w - tw) / 2);
63 if (paint->fill_rect ==
nullptr) {
67 paint->fill_rect(paint->user, rect->
x, rect->
y, rect->
w, rect->
h, fill);
70 const int32_t bw = (int32_t)border_w;
71 paint->fill_rect(paint->user, rect->
x, rect->
y, rect->
w, rect->
h, border);
72 paint->fill_rect(paint->user,
81typedef enum : int32_t {
97 return (int32_t)(((uint32_t)width * v) / total);
#define RA8_PRIV
Module-private helper: shared across TUs but only inside one library.
Axis-aligned rectangle in framebuffer pixel coordinates.
int32_t w
Width (pixels, >= 0).
int32_t h
Height (pixels, >= 0).
int32_t x
Left edge (pixels).
int32_t y
Top edge (pixels).