Struct bracket_terminal::prelude::MultiTileSprite
source · [−]pub struct MultiTileSprite { /* private fields */ }
Expand description
Represents a sprite consisting of multiple glyphs/colors, occupying multiple console locations.
Implementations
sourceimpl MultiTileSprite
impl MultiTileSprite
sourcepub fn from_string<S: ToString, T>(content: S, width: T, height: T) -> Selfwhere
T: Into<i32>,
pub fn from_string<S: ToString, T>(content: S, width: T, height: T) -> Selfwhere
T: Into<i32>,
Generates a sprite from an input string, divided into width x height sizes.
sourcepub fn from_string_colored<S: ToString, T>(
content: S,
width: T,
height: T,
fg: &[RGBA],
bg: &[RGBA]
) -> Selfwhere
T: Into<i32>,
pub fn from_string_colored<S: ToString, T>(
content: S,
width: T,
height: T,
fg: &[RGBA],
bg: &[RGBA]
) -> Selfwhere
T: Into<i32>,
Generates a sprite from an input string, divided into width x height sizes. Also provides foreground and background colors.
sourcepub fn render(&self, context: &mut BTerm, position: Point)
pub fn render(&self, context: &mut BTerm, position: Point)
Directly renders a sprite to an BTerm context.
sourcepub fn add_to_batch(&self, batch: &mut DrawBatch, position: Point)
pub fn add_to_batch(&self, batch: &mut DrawBatch, position: Point)
Appends draw-calls to a batch to render a multi-tile sprite.
Auto Trait Implementations
impl RefUnwindSafe for MultiTileSprite
impl Send for MultiTileSprite
impl Sync for MultiTileSprite
impl Unpin for MultiTileSprite
impl UnwindSafe for MultiTileSprite
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more