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 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: f64, y: f64, width: f64, height: f64)
pub fn clip0(&mut self)
pub fn camera(&mut self, x: f64, y: f64)
pub fn camera0(&mut self)
pub fn cls(&mut self, tile: Tile)
pub fn pget(&mut self, x: f64, y: f64) -> Tile
pub fn pset(&mut self, x: f64, y: f64, tile: Tile)
pub fn line(&mut self, x1: f64, y1: f64, x2: f64, y2: f64, tile: Tile)
pub fn rect(&mut self, x: f64, y: f64, width: f64, height: f64, tile: Tile)
pub fn rectb(&mut self, x: f64, y: f64, width: f64, height: f64, tile: Tile)
pub fn circ(&mut self, x: f64, y: f64, radius: f64, tile: Tile)
pub fn circb(&mut self, x: f64, y: f64, radius: f64, tile: Tile)
pub fn elli(&mut self, x: f64, y: f64, width: f64, height: f64, tile: Tile)
pub fn ellib(&mut self, x: f64, y: f64, width: f64, height: f64, tile: Tile)
pub fn tri( &mut self, x1: f64, y1: f64, x2: f64, y2: f64, x3: f64, y3: f64, tile: Tile, )
pub fn trib( &mut self, x1: f64, y1: f64, x2: f64, y2: f64, x3: f64, y3: f64, tile: Tile, )
pub fn fill(&mut self, x: f64, y: f64, tile: Tile)
pub fn blt( &mut self, x: f64, y: f64, tilemap: SharedTilemap, tilemap_x: f64, tilemap_y: f64, width: f64, height: f64, transparent: Option<Tile>, rotate: Option<f64>, scale: Option<f64>, )
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