Expand description
The one grid-drawing primitive: an area-clipped, single-layer view over a Grid.
Surface: an area-clipped, single-layer view over a Grid.
Surface is the workspace’s one grid-drawing primitive. Terminal’s
draw/surface hand out a Surface
scoped to the whole grid, and retroglyph-ui renders every widget into a Surface
scoped to a sub-Rect: there is no separate stateful drawing API on Terminal itself.
Place characters directly with put (or print for a
string, which handles newlines and wide characters), style-aware spans with
print_line, or a whole styled run with
with_style so repeated calls don’t need to pass the same Style
each time. clear/clear_region blank the active
layer (in full, or a rectangular region); switch layers with
on_layer. Or bypass the builder entirely and reach the Grid
directly via grid_mut.
Structs§
- Styled
Surface - A
Surfacewith aStylebound in, returned bySurface::with_style. - Surface
- The render target for every drawing call in the workspace: a mutable reference to a
Gridplus a fixedlayer, scoped to anareaand clipped to acliprect.
Enums§
- Layer
- A named z-order tier for
Surface::on_tier, covering the split most apps with overlapping UI actually need.