RMGui 0.15.0
C11 retained-mode UI library: layout kernel, style schema, widget painters, fonts, software framebuffer
Loading...
Searching...
No Matches
geom.h File Reference

Value types shared by RMGui modules and passed by value. More...

#include <stdint.h>

Data Structures

struct  rmgui_rect_t
 Half-open rectangle [x, x + w) by [y, y + h) in logical framebuffer pixels. More...
struct  rmgui_color_t
 Straight (non-premultiplied) RGBA8. More...
struct  rmgui_size_t
 Width and height in logical framebuffer pixels. More...

Functions

rmgui_rect_t rmgui_rect_intersect (rmgui_rect_t a, rmgui_rect_t b)
 Intersection of two rectangles in logical framebuffer pixels.

Detailed Description

Value types shared by RMGui modules and passed by value.

Function Documentation

◆ rmgui_rect_intersect()

rmgui_rect_t rmgui_rect_intersect ( rmgui_rect_t a,
rmgui_rect_t b )

Intersection of two rectangles in logical framebuffer pixels.

The origin is the larger input origin on each axis. An axis with no overlap has extent zero. The result is exact for any int rectangle coordinates and extents; far edges are computed in 64 bits.