- rename `Pixel` to `NcPixel`
- rename `cell_simple_initializer` to `cell_char_initializer`
and `cell_load_simple` to `cell_load_char`
- create constructor for `NcReader`
- fix and improve documentation for several types.
- Add `NcDirectOptions` struct and `NcDirectOptionHoriz` union
/// A Cell corresponds to a single character cell on some plane, which can be occupied by a single grapheme cluster (some root spacing glyph, along with possible combining characters, which might span multiple columns). At any cell, we can have a theoretically arbitrarily long UTF-8 string, a foreground color, a background color, and an attribute set. Valid grapheme cluster contents include:
/// A Cell corresponds to a single character cell on some plane, which can be
/// occupied by a single grapheme cluster (some root spacing glyph, along with
/// possible combining characters, which might span multiple columns). At any
/// cell, we can have a theoretically arbitrarily long UTF-8 string, a
/// foreground color, a background color, and an attribute set.
///
/// Valid grapheme cluster contents include:
///
/// - A NUL terminator,
/// - A single control character, followed by a NUL terminator,
@ -189,15 +205,23 @@ pub type Pixel = u32;
///
/// We implement some small alpha compositing. Foreground and background both
/// have two bits of inverted alpha. The actual grapheme written to a cell is
/// the topmost non-zero grapheme. If its alpha is 00, its foreground color is
/// used unchanged. If its alpha is 10, its foreground color is derived entirely
/// from cells underneath it. Otherwise, the result will be a composite.
/// the topmost non-zero grapheme.
///
/// - If its alpha is 00 (CELL_ALPHA_OPAQUE) its foreground color is used unchanged.
///
/// - If its alpha is 10 (CELL_ALPHA_TRANSPARENT) its foreground color is derived
/// entirely from cells underneath it.
///
/// - Otherwise, the result will be a composite (CELL_ALPHA_BLEND).
///
/// Likewise for the background. If the bottom of a coordinate's zbuffer is
/// reached with a cumulative alpha of zero, the default is used. In this way,
/// a terminal configured with transparent background can be supported through
/// multiple occluding ncplanes. A foreground alpha of 11 requests high-contrast
/// text (relative to the computed background). A background alpha of 11 is
/// currently forbidden.
/// multiple occluding ncplanes.
///
/// A foreground alpha of 11 (CELL_ALPHA_HIGHCONTRAST) requests high-contrast
/// text (relative to the computed background).
/// A background alpha of 11 is currently forbidden.
///
/// Default color takes precedence over palette or RGB, and cannot be used with
/// transparency. Indexed palette takes precedence over RGB. It cannot
@ -211,7 +235,7 @@ pub type Cell = crate::cell;
// Egc
//
/// 32-bit Char, Extended Grapheme Cluster
/// 32-bit Char(Extended Grapheme Cluster)
///
/// This 32 bit char, together with the associated plane's associated egcpool,
/// completely define this cell's `Egc`. Unless the `Egc` requires more than
@ -242,23 +266,24 @@ pub type Cell = crate::cell;
/// in a cell, and therefore it must not be allowed through the API.
///
/// -----
/// NOTE that even if the `Egc` is <= 4 bytes and inlined, is still interpreted
/// NOTE that even if the `Egc` is <= 4 bytes and inlined, is still interpreted as
/// a NUL-terminated char * (technically, &cell->gcluster is treated as a char*).
/// If it is more than 4 bytes, cell->gcluster has a first byte of 0x01,
/// and the remaining 24 bits are an index into the plane's egcpool,
/// which is carved into NUL-terminated chunks of arbitrary length.
///
/// `type in C: gcluster (uint32_t)`
/// `type in C: uint32_t`
///
// WIP towards a safe abstraction for Cell & functions receiving
pubtypeEgc=char;
// pub type EgcPool<'a> = &'a[u8];
pubtypeCellGcluster=u32;// the type cell.gcluster expects the EGB to be
/// Egc BackStop
// EgcBackStop
/// 8 bits always at zero, part of the [`Cell`](type.Cell.html) struct
///
/// ```txt
/// 00000000
/// ```
///
/// `type in C: cell.gcluster_backstop`
/// `type in C: uint_8t`
///
pubtypeEgcBackstop=u8;
@ -270,7 +295,7 @@ pub type EgcBackstop = u8;
/// 11111111 11111111
/// ```
///
/// `type in C: stylemask (uint16_t)`
/// `type in C: uint16_t`
///
pubtypeStyleMask=u16;
@ -285,7 +310,21 @@ pub type StyleMask = u16;
/// `type in C: ncplane (struct)`
pubtypeNcPlane=crate::ncplane;
/// Options struct for [`NcPlane`](type.NcPlane.html)
pubtypeNcPlaneOptions=crate::ncplane_options;
/// The `horiz` union field of [`NcPlaneOptions`](type.NcPlaneOptions)