Type Definition libnotcurses_sys::NcBoxMask [−][src]
pub type NcBoxMask = u32;Expand description
Controls the drawing of borders, gradients and corners (alias of u32).
NcBoxMax is defined in the least significant byte, where bits [3, 0] are are a border mask, and bits [7, 4] are a gradient mask.
The drawing of the corners is defined in the second byte,
see NcBoxMask::CORNER_MASK.
Diagram
MASK_TOP 0x0001 0b00000001
MASK_RIGHT 0x0002 0b00000010
MASK_BOTTOM 0x0004 0b00000100
MASK_LEFT 0x0008 0b00001000
GRAD_TOP 0x0010 0b00010000
GRAD_RIGHT 0x0020 0b00100000
GRAD_BOTTOM 0x0040 0b01000000
GRAD_LEFT 0x0080 0b10000000
NCBOXCORNER_MASK 0x0300 0b00000111_00000000
NCBOXCORNER_SHIFT 8Trait Implementations
NcBoxMask right gradient mask.
NcBoxMask bottom gradient mask.
NcBoxMask right border mask.
NcBoxMask bottom border mask.
NcBoxMask corner mask to control the drawing of boxes corners.
By default, vertexes are drawn whether their connecting edges are drawn or not. The value of the bits control this, and are interpreted as the number of connecting edges necessary to draw a given corner.
At 0 (the default), corners are always drawn. At 3, corners are never drawn (since at most 2 edges can touch a box’s corner),.
The number of bits
NcBoxMask::CORNER_MASK
is shifted.
