Function libnotcurses_sys::ncplane_box[][src]

pub unsafe extern "C" fn ncplane_box(
    n: *mut ncplane,
    ul: *const nccell,
    ur: *const nccell,
    ll: *const nccell,
    lr: *const nccell,
    hline: *const nccell,
    vline: *const nccell,
    ystop: c_int,
    xstop: c_int,
    ctlword: c_uint
) -> c_int
Expand description

Draw a box with its upper-left corner at the current cursor position, and its lower-right corner at ‘ystop’x’xstop’. The 6 cells provided are used to draw the upper-left, ur, ll, and lr corners, then the horizontal and vertical lines. ‘ctlword’ is defined in the least significant byte, where bits [7, 4] are a gradient mask, and [3, 0] are a border mask:

  • 7, 3: top
  • 6, 2: right
  • 5, 1: bottom
  • 4, 0: left If the gradient bit is not set, the styling from the hl/vl cells is used for the horizontal and vertical lines, respectively. If the gradient bit is set, the color is linearly interpolated between the two relevant corner cells.

By default, vertexes are drawn whether their connecting edges are drawn or not. The value of the bits corresponding to NCBOXCORNER_MASK 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).