pub struct Renderer<T, P>where
T: TilesetEnum,
P: PaletteEnum,{ /* private fields */ }
Expand description
Loads and stores fixed size tiles organized into tilesets that can be added and removed individually.
Implementations§
source§impl<T, P> Renderer<T, P>where
T: TilesetEnum,
P: PaletteEnum,
impl<T, P> Renderer<T, P>where
T: TilesetEnum,
P: PaletteEnum,
pub fn width(&self) -> u16
pub fn height(&self) -> u16
pub fn tile_width(&self) -> u8
pub fn tile_height(&self) -> u8
pub fn load_palettes_from_atlas(&mut self, atlas: &Atlas<T, P>)
pub fn pop_tileset(&mut self)
pub fn load_tileset( &mut self, atlas: &Atlas<T, P>, tileset_id: impl TilesetEnum )
pub fn get_tileset_palette(&self, tileset_id: impl Into<usize>) -> &Palette
pub fn get_tilemap( &self, tileset_id: impl Into<usize>, tilemap_id: impl Into<usize> ) -> &Tilemap
pub fn get_tilemap_mut( &mut self, tileset_id: impl Into<usize>, tilemap_id: impl Into<usize> ) -> &mut Tilemap
pub fn get_font( &self, tileset_id: impl Into<usize>, font_id: impl Into<usize> ) -> &Font
pub fn get_anim( &self, tileset_id: impl Into<usize>, anim_id: impl Into<usize> ) -> &Anim
pub fn get_tile(&self, index: u8, tileset_id: usize) -> TileID
pub fn get_rect(&self, index: usize) -> Rect<u8>
pub fn get_pixel(&self, x: usize, y: usize) -> u8
Auto Trait Implementations§
impl<T, P> Freeze for Renderer<T, P>
impl<T, P> RefUnwindSafe for Renderer<T, P>where
P: RefUnwindSafe,
T: RefUnwindSafe,
impl<T, P> Send for Renderer<T, P>
impl<T, P> Sync for Renderer<T, P>
impl<T, P> Unpin for Renderer<T, P>
impl<T, P> UnwindSafe for Renderer<T, P>where
P: UnwindSafe,
T: UnwindSafe,
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