pub enum RenderOp {
Show 15 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,
},
TextBlock {
x: u16,
y: u16,
w: u16,
h: u16,
text: String,
style: Style,
wrap: WrapOpts,
},
TextBlockStyled {
x: u16,
y: u16,
w: u16,
h: u16,
spans: Vec<Span>,
wrap: WrapOpts,
},
FillRect {
x: u16,
y: u16,
w: u16,
h: u16,
glyph: String,
style: Style,
},
Box {
x: u16,
y: u16,
w: u16,
h: u16,
charset: BoxCharset,
style: Style,
},
Blit {
x: u16,
y: u16,
w: u16,
h: u16,
cells: Vec<Option<BlitCell>>,
},
}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.
TextBlock
Put a multi-line block of text, wrapped and clipped within a rectangle.
This is a higher-level convenience op.
TextBlockStyled
Put a styled multi-line block (spans), wrapped and clipped within a rectangle.
FillRect
Fill a rectangle with a single glyph.
Box
Draw a box (border) around a rectangle.
Blit
Blit a rectangular payload of optional cells.
cells is row-major with length w*h.