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