Struct alacritty::display::content::RenderableCell
source · pub struct RenderableCell {
pub character: char,
pub point: Point<usize>,
pub fg: Rgb,
pub bg: Rgb,
pub bg_alpha: f32,
pub underline: Rgb,
pub flags: Flags,
pub extra: Option<Box<RenderableCellExtra>>,
}
Expand description
Cell ready for rendering.
Fields§
§character: char
§point: Point<usize>
§fg: Rgb
§bg: Rgb
§bg_alpha: f32
§underline: Rgb
§flags: Flags
§extra: Option<Box<RenderableCellExtra>>
Implementations§
source§impl RenderableCell
impl RenderableCell
fn new(content: &mut RenderableContent<'_>, cell: Indexed<&Cell>) -> Self
sourcefn compute_cell_rgb(
cell_fg: &mut Rgb,
cell_bg: &mut Rgb,
bg_alpha: &mut f32,
fg: CellRgb,
bg: CellRgb
)
fn compute_cell_rgb( cell_fg: &mut Rgb, cell_bg: &mut Rgb, bg_alpha: &mut f32, fg: CellRgb, bg: CellRgb )
Apply CellRgb
colors to the cell’s colors.
sourcefn compute_fg_rgb(
content: &mut RenderableContent<'_>,
fg: Color,
flags: Flags
) -> Rgb
fn compute_fg_rgb( content: &mut RenderableContent<'_>, fg: Color, flags: Flags ) -> Rgb
Get the RGB color from a cell’s foreground color.
sourcefn compute_bg_rgb(content: &mut RenderableContent<'_>, bg: Color) -> Rgb
fn compute_bg_rgb(content: &mut RenderableContent<'_>, bg: Color) -> Rgb
Get the RGB color from a cell’s background color.
sourcefn compute_bg_alpha(config: &UiConfig, bg: Color) -> f32
fn compute_bg_alpha(config: &UiConfig, bg: Color) -> f32
Compute background alpha based on cell’s original color.
Since an RGB color matching the background should not be transparent, this is computed using the named input color, rather than checking the RGB of the background after its color is computed.
Trait Implementations§
source§impl Clone for RenderableCell
impl Clone for RenderableCell
source§fn clone(&self) -> RenderableCell
fn clone(&self) -> RenderableCell
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more