pub enum RenderOp {
Show 18 variants
Clear,
ClearLine {
y: u16,
},
ClearEol {
x: u16,
y: u16,
},
ClearBol {
x: u16,
y: u16,
},
ClearEos {
x: u16,
y: u16,
},
ClearRect {
x: u16,
y: u16,
w: u16,
h: u16,
},
Put {
x: u16,
y: u16,
text: String,
style: Style,
},
PutGlyph {
x: u16,
y: u16,
glyph: String,
style: Style,
},
Label {
x: u16,
y: u16,
w: u16,
text: String,
style: Style,
truncate: TruncateMode,
},
LabelStyled {
x: u16,
y: u16,
w: u16,
spans: Vec<Span>,
truncate: TruncateMode,
},
PutStyled {
x: u16,
y: u16,
w: u16,
spans: Vec<Span>,
truncate: TruncateMode,
},
PutWrapped {
x: u16,
y: u16,
w: u16,
text: String,
style: Style,
},
PutWrappedStyled {
x: u16,
y: u16,
w: u16,
spans: Vec<Span>,
wrap_opts: WrapOpts,
max_lines: Option<u16>,
},
Blit {
x: u16,
y: u16,
w: u16,
h: u16,
cells: Vec<Option<BlitCell>>,
},
FillRect {
x: u16,
y: u16,
w: u16,
h: u16,
style: Style,
},
HLine {
x: u16,
y: u16,
len: u16,
glyph: String,
style: Style,
},
VLine {
x: u16,
y: u16,
len: u16,
glyph: String,
style: Style,
},
Box {
x: u16,
y: u16,
w: u16,
h: u16,
style: Style,
charset: BoxCharset,
},
}Variants§
Clear
Clear the entire grid to empty cells.
ClearLine
Clear a full line (row) to plain spaces.
This is rendered as plain spaces rather than Cell::Empty to avoid
style bleed from earlier styled cells on the same line.
ClearEol
Clear from (x,y) to end-of-line (inclusive) to plain spaces.
This mirrors ANSI EL (erase in line) mode 0.
ClearBol
Clear from start-of-line to (x,y) (inclusive) to plain spaces.
This mirrors ANSI EL (erase in line) mode 1.
ClearEos
Clear from (x,y) to end-of-screen (inclusive) to plain spaces.
This mirrors ANSI ED (erase in display) mode 0.
ClearRect
Clear a rectangle to plain spaces.
This is semantically equivalent to FillRect with a plain style.
Put
Put text at a coordinate.
PutGlyph
Put a single glyph (grapheme cluster) at a coordinate.
Label
Put a single-line label, clipped to w cells.
This is a convenience op for common UI labels.
Fields
truncate: TruncateModeLabelStyled
Put a single-line styled label (spans), clipped to w cells.
This op is analogous to Label but supports inline styling.
PutStyled
Put a single-line styled label (spans), clipped to w cells.
This op is useful for UI where inline styling is needed (for example, highlighted search matches or mixed emphasis).
PutWrapped
Put wrapped text within w cells, flowing downward from (x,y).
Wrapping is whitespace-aware with hard-break fallback for long words.
PutWrappedStyled
Put wrapped styled text (spans) within w cells, flowing downward from (x,y).
Wrapping is whitespace-aware with hard-break fallback for long tokens.
Use wrap_opts to control whitespace preservation and trimming.
Fields
Blit
Blit (copy) a small source cell-map onto the grid.
cellsis a row-major array of lengthw*h.nullcells are transparent (leave destination unchanged).- Wide glyphs (width=2) occupy two destination cells; the next source cell in that row is ignored.
FillRect
Fill a rectangle with styled spaces.
Use this for clearing regions and for background fills.
HLine
Draw a horizontal line using a single glyph.
len is measured in cells. For width=2 glyphs, placement will stop
when fewer than 2 cells remain.
VLine
Draw a vertical line using a single glyph.
len is measured in rows.
Box
Draw a bordered box.
The box is clipped to the grid bounds.