pub struct MultiTileSprite { /* private fields */ }
Expand description
Represents a sprite consisting of multiple glyphs/colors, occupying multiple console locations.
Implementations§
Source§impl MultiTileSprite
impl MultiTileSprite
Sourcepub fn from_string<S, T>(content: S, width: T, height: T) -> MultiTileSprite
pub fn from_string<S, T>(content: S, width: T, height: T) -> MultiTileSprite
Generates a sprite from an input string, divided into width x height sizes.
Sourcepub fn from_string_colored<S, T>(
content: S,
width: T,
height: T,
fg: &[RGBA],
bg: &[RGBA],
) -> MultiTileSprite
pub fn from_string_colored<S, T>( content: S, width: T, height: T, fg: &[RGBA], bg: &[RGBA], ) -> MultiTileSprite
Generates a sprite from an input string, divided into width x height sizes. Also provides foreground and background colors.
Sourcepub fn from_xp(rex: &XpFile) -> MultiTileSprite
pub fn from_xp(rex: &XpFile) -> MultiTileSprite
Import a sprite from an XP Rex Paint file.
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 Freeze for MultiTileSprite
impl RefUnwindSafe for MultiTileSprite
impl Send for MultiTileSprite
impl Sync for MultiTileSprite
impl Unpin for MultiTileSprite
impl UnwindSafe for MultiTileSprite
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