use crate::color;
use crate::mat;
#[derive(Clone, Debug, PartialEq)]
pub struct Glyph {
pub char: char,
pub foreground: Option<color::Rgb>,
pub background: Option<color::Rgb>,
}
impl Glyph {
#[inline]
pub fn new(char: char, foreground: color::Rgb, background: color::Rgb) -> Glyph {
Glyph {
char,
foreground: Some(foreground),
background: Some(background),
}
}
}
impl Default for Glyph {
#[inline]
fn default() -> Glyph {
Glyph {
char: ' ',
foreground: None,
background: None,
}
}
}
pub type GlyphsVec = mat::MatrixVec<Glyph>;
pub type GlyphsRef<'a> = mat::MatrixRef<'a, Glyph>;
pub type GlyphsRefMut<'a> = mat::MatrixRefMut<'a, Glyph>;