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

A nine-slice shape: over any rect at least left + right wide and top + bottom tall it is whole (coverage 255) inside the rect inset by the four band widths, and inside the bands it reads its masks at their own size, never stretched across the rect's size: corner[0..3] the top-left (left x top), top-right (right x top), bottom-left (left x bottom) and bottom-right (right x bottom) corners; edge[0..3] one line across the top band (1 x top), the bottom band (1 x bottom), the left band (left x 1) and the right band (right x 1), repeated along that side between its corners. More...

#include <mask.h>

Data Fields

int left
int top
int right
int bottom
rmgui_mask_t corner [4]
rmgui_mask_t edge [4]

Detailed Description

A nine-slice shape: over any rect at least left + right wide and top + bottom tall it is whole (coverage 255) inside the rect inset by the four band widths, and inside the bands it reads its masks at their own size, never stretched across the rect's size: corner[0..3] the top-left (left x top), top-right (right x top), bottom-left (left x bottom) and bottom-right (right x bottom) corners; edge[0..3] one line across the top band (1 x top), the bottom band (1 x bottom), the left band (left x 1) and the right band (right x 1), repeated along that side between its corners.

An empty mask is coverage 0 over its whole piece. Band widths are in the pixels of the rect the shape is laid over and are never negative. Zero-initialized is the whole rect; rmgui_mask_nine_free releases it.

Field Documentation

◆ left

int rmgui_mask_nine_t::left

◆ top

int rmgui_mask_nine_t::top

◆ right

int rmgui_mask_nine_t::right

◆ bottom

int rmgui_mask_nine_t::bottom

◆ corner

rmgui_mask_t rmgui_mask_nine_t::corner[4]

◆ edge

rmgui_mask_t rmgui_mask_nine_t::edge[4]

The documentation for this struct was generated from the following file: