pub struct CellPainter<'a, A: AtlasView> { /* private fields */ }Implementations§
Source§impl<'a, A: AtlasView> CellPainter<'a, A>
impl<'a, A: AtlasView> CellPainter<'a, A>
Sourcepub fn new(
screen: &'a ScreenBuffer,
metrics: CellMetrics,
theme: &'a ResolvedTheme,
atlas: &'a A,
shape_frame: &'a ShapeFrame,
) -> Self
pub fn new( screen: &'a ScreenBuffer, metrics: CellMetrics, theme: &'a ResolvedTheme, atlas: &'a A, shape_frame: &'a ShapeFrame, ) -> Self
Overlays default to absent and layer on through with_*.
The provided shape_frame determines whether cells render via glyph IDs, clusters,
or the per-char fallback.
Sourcepub const fn with_reverse_video(self, on: bool) -> Self
pub const fn with_reverse_video(self, on: bool) -> Self
?5 DECSCNM as the daemon reports it, xor’d against each cell’s
SGR 7.
Sourcepub const fn with_cursor_visible(self, visible: bool) -> Self
pub const fn with_cursor_visible(self, visible: bool) -> Self
True only while focused and the blink clock is in its visible phase; both hide the cursor identically, so they arrive folded.
pub const fn with_selection(self, selection: Option<SelectionRange>) -> Self
Sourcepub const fn with_viewport(self, viewport: u32, viewport_max: u32) -> Self
pub const fn with_viewport(self, viewport: u32, viewport_max: u32) -> Self
viewport rows above the live bottom out of viewport_max; 0
is the live bottom.
Sourcepub const fn with_reserved_bottom_rows(self, rows: u16) -> Self
pub const fn with_reserved_bottom_rows(self, rows: u16) -> Self
Rows trimmed off the bottom so bottom-anchored chrome (the search bar) owns them without the cells doubling through.
Sourcepub const fn with_preedit(self, span: Option<PreeditSpan>) -> Self
pub const fn with_preedit(self, span: Option<PreeditSpan>) -> Self
The span (from preedit_covered_cols) whose cells are skipped
so the underlying glyph does not draw through the opaque overlay
in the later fg pass.
Sourcepub fn extend_screen(self, out: &mut RowPaint)
pub fn extend_screen(self, out: &mut RowPaint)
Appends into caller-owned scratch (kept across frames so the steady state allocates nothing); callers clear first for a fresh frame. An atlas miss skips only the fg quad; the bg still lands.
Sourcepub const fn cursor(&self) -> CursorPaint
pub const fn cursor(&self) -> CursorPaint
Resolved by Self::resolved; meaningless before.
Sourcepub fn extend_row(&self, out: &mut RowPaint, r: u16)
pub fn extend_row(&self, out: &mut RowPaint, r: u16)
Everything a row emits depends on that row’s cells and the painter’s frame-wide inputs alone, which is what lets a renderer’s row cache repaint a row in isolation.
Sourcepub fn push_scrollbar_lane(&self, out: &mut RowPaint)
pub fn push_scrollbar_lane(&self, out: &mut RowPaint)
Absent at the live bottom. Gated on viewport_max > rows as
defense-in-depth: the daemon should already have clamped.