pub struct Pen {
pub fg: Color,
pub bg: Color,
pub flags: CellFlags,
pub underline_color: Color,
}Expand description
The current SGR state — the appearance copied into each printed cell.
Modelling it as a “template cell” mirrors Alacritty: a later slice can make
erase (ED/EL) fill cleared cells with bg instead of Default and that
is Background Color Erase (BCE), no structural change. See term.rs.
No #[non_exhaustive] (#844): nothing outside this crate has a reason to build one. No
public function accepts it — the engine hands it out — and there are zero out-of-crate literal
sites, so the attribute would bind nothing it does not already bind.
Fields§
§fg: Color§bg: Color§flags: CellFlags§underline_color: ColorThe underline colour (SGR 58, #520): what an underline / strikethrough draws
in, independent of fg. Default means “follow the fg”. It is not packed
into the printed Cell (the 12-byte cell is full); the print path stamps a
non-default value into the row’s ucolor map. See term.rs::write_glyph.