pub struct Cell {
pub glyph: char,
pub fg: Rgb,
pub bg: Rgb,
pub see_through: bool,
}Expand description
One console cell: a glyph with foreground and background colours.
Fields§
§glyph: charThe character drawn in the cell.
fg: RgbGlyph colour.
bg: RgbBackground colour.
see_through: boolNo background is drawn: the buffer’s Backdrop shows behind the
glyph (the console’s clear colour where there is none). bg is
kept but not shown.
Implementations§
Source§impl Cell
impl Cell
Sourcepub const fn see_through(glyph: char, fg: Rgb) -> Cell
pub const fn see_through(glyph: char, fg: Rgb) -> Cell
A cell with no background (game ADR-0048): glyph in fg over the
buffer’s Backdrop. A space is a plain hole.
GlyphBuffer::print_fg over it keeps it see-through; anything
that sets a whole cell makes it solid again.
Sourcepub const fn is_continuation(&self) -> bool
pub const fn is_continuation(&self) -> bool
Whether this is the second cell of a wide character, drawn by the first: never a glyph of its own.
Trait Implementations§
impl Copy for Cell
impl Eq for Cell
impl StructuralPartialEq for Cell
Auto Trait Implementations§
impl Freeze for Cell
impl RefUnwindSafe for Cell
impl Send for Cell
impl Sync for Cell
impl Unpin for Cell
impl UnsafeUnpin for Cell
impl UnwindSafe for Cell
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more