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: &RenderableContent<'_>,
fg: Color,
flags: Flags,
) -> Rgb
fn compute_fg_rgb( content: &RenderableContent<'_>, fg: Color, flags: Flags, ) -> Rgb
Get the RGB color from a cell’s foreground color.
sourcefn compute_bg_rgb(content: &RenderableContent<'_>, bg: Color) -> Rgb
fn compute_bg_rgb(content: &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 moreAuto Trait Implementations§
impl Freeze for RenderableCell
impl RefUnwindSafe for RenderableCell
impl Send for RenderableCell
impl Sync for RenderableCell
impl Unpin for RenderableCell
impl UnwindSafe for RenderableCell
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.