pub struct Tilemap {
pub imgsrc: ImageSource,
/* private fields */
}
Fields§
§imgsrc: ImageSource
Implementations§
Source§impl Tilemap
impl Tilemap
pub fn new(width: u32, height: u32, imgsrc: ImageSource) -> SharedTilemap
pub fn from_tmx(filename: &str, layer_index: u32) -> SharedTilemap
pub const fn width(&self) -> u32
pub const fn height(&self) -> u32
pub fn data_ptr(&mut self) -> *mut Tile
pub fn set(&mut self, x: i32, y: i32, data_str: &[&str])
pub fn load(&mut self, x: i32, y: i32, filename: &str, layer_index: u32)
pub fn clip(&mut self, x: f32, y: f32, width: f32, height: f32)
pub fn clip0(&mut self)
pub fn camera(&mut self, x: f32, y: f32)
pub fn camera0(&mut self)
pub fn cls(&mut self, tile: Tile)
pub fn pget(&mut self, x: f32, y: f32) -> Tile
pub fn pset(&mut self, x: f32, y: f32, tile: Tile)
pub fn line(&mut self, x1: f32, y1: f32, x2: f32, y2: f32, tile: Tile)
pub fn rect(&mut self, x: f32, y: f32, width: f32, height: f32, tile: Tile)
pub fn rectb(&mut self, x: f32, y: f32, width: f32, height: f32, tile: Tile)
pub fn circ(&mut self, x: f32, y: f32, radius: f32, tile: Tile)
pub fn circb(&mut self, x: f32, y: f32, radius: f32, tile: Tile)
pub fn elli(&mut self, x: f32, y: f32, width: f32, height: f32, tile: Tile)
pub fn ellib(&mut self, x: f32, y: f32, width: f32, height: f32, tile: Tile)
pub fn tri( &mut self, x1: f32, y1: f32, x2: f32, y2: f32, x3: f32, y3: f32, tile: Tile, )
pub fn trib( &mut self, x1: f32, y1: f32, x2: f32, y2: f32, x3: f32, y3: f32, tile: Tile, )
pub fn fill(&mut self, x: f32, y: f32, tile: Tile)
pub fn blt( &mut self, x: f32, y: f32, tilemap: SharedTilemap, tilemap_x: f32, tilemap_y: f32, width: f32, height: f32, transparent: Option<Tile>, rotate: Option<f32>, scale: Option<f32>, )
Auto Trait Implementations§
impl Freeze for Tilemap
impl !RefUnwindSafe for Tilemap
impl Send for Tilemap
impl Sync for Tilemap
impl Unpin for Tilemap
impl !UnwindSafe for Tilemap
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> 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 more