pub struct RenderBatch { /* private fields */ }Expand description
Batched render operations
Implementations§
Source§impl RenderBatch
impl RenderBatch
Sourcepub fn with_capacity(capacity: usize) -> Self
pub fn with_capacity(capacity: usize) -> Self
Create a batch with pre-allocated capacity
Sourcepub fn set_optimize(&mut self, optimize: bool)
pub fn set_optimize(&mut self, optimize: bool)
Enable/disable operation optimization
Sourcepub fn set_cell(
&mut self,
x: u16,
y: u16,
ch: char,
fg: Option<Color>,
bg: Option<Color>,
)
pub fn set_cell( &mut self, x: u16, y: u16, ch: char, fg: Option<Color>, bg: Option<Color>, )
Set a single cell
Sourcepub fn set_styled_cell(&mut self, x: u16, y: u16, cell: Cell)
pub fn set_styled_cell(&mut self, x: u16, y: u16, cell: Cell)
Set a cell with full styling
Sourcepub fn fill_rect(
&mut self,
rect: Rect,
ch: char,
fg: Option<Color>,
bg: Option<Color>,
)
pub fn fill_rect( &mut self, rect: Rect, ch: char, fg: Option<Color>, bg: Option<Color>, )
Fill a rectangular region
Sourcepub fn hline(&mut self, x: u16, y: u16, len: u16, ch: char, fg: Option<Color>)
pub fn hline(&mut self, x: u16, y: u16, len: u16, ch: char, fg: Option<Color>)
Draw a horizontal line
Sourcepub fn vline(&mut self, x: u16, y: u16, len: u16, ch: char, fg: Option<Color>)
pub fn vline(&mut self, x: u16, y: u16, len: u16, ch: char, fg: Option<Color>)
Draw a vertical line
Sourcepub fn text(
&mut self,
x: u16,
y: u16,
text: impl Into<String>,
fg: Option<Color>,
bg: Option<Color>,
)
pub fn text( &mut self, x: u16, y: u16, text: impl Into<String>, fg: Option<Color>, bg: Option<Color>, )
Draw text
Sourcepub fn styled_text(
&mut self,
x: u16,
y: u16,
text: impl Into<String>,
fg: Option<Color>,
bg: Option<Color>,
modifier: Modifier,
)
pub fn styled_text( &mut self, x: u16, y: u16, text: impl Into<String>, fg: Option<Color>, bg: Option<Color>, modifier: Modifier, )
Draw styled text
Sourcepub fn clear_screen(&mut self)
pub fn clear_screen(&mut self)
Clear screen
Sourcepub fn move_cursor(&mut self, x: u16, y: u16)
pub fn move_cursor(&mut self, x: u16, y: u16)
Move cursor
Sourcepub fn show_cursor(&mut self, show: bool)
pub fn show_cursor(&mut self, show: bool)
Show/hide cursor
Sourcepub fn dirty_regions(&self) -> &[Rect]
pub fn dirty_regions(&self) -> &[Rect]
Get dirty regions
Sourcepub fn apply_to_buffer(&self, buffer: &mut Buffer)
pub fn apply_to_buffer(&self, buffer: &mut Buffer)
Apply batch to a buffer
Trait Implementations§
Source§impl Debug for RenderBatch
impl Debug for RenderBatch
Source§impl Default for RenderBatch
impl Default for RenderBatch
Source§fn default() -> RenderBatch
fn default() -> RenderBatch
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RenderBatch
impl RefUnwindSafe for RenderBatch
impl Send for RenderBatch
impl Sync for RenderBatch
impl Unpin for RenderBatch
impl UnwindSafe for RenderBatch
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().