Struct pixels_graphics_lib::prelude::tilesets::BasicTileset
source · pub struct BasicTileset { /* private fields */ }
Expand description
BasicTileset can be used for simple tile sets/atlas
The format is: { name: string, optional image_file: string, path tile_sizes: width: integer, px height: integer, px tiles: [ id: string x: integer, coord (ie this tile will be x * width .. (x + 1) * width) y: integer, coord ] }
Implementations§
source§impl BasicTileset
impl BasicTileset
sourcepub fn load_from_file(
path: &str
) -> Result<HashMap<String, Image, RandomState>, ImageWrapperError>
pub fn load_from_file(
path: &str
) -> Result<HashMap<String, Image, RandomState>, ImageWrapperError>
See BasicTileset for format
Returns tile ids mapped to Images
Trait Implementations§
source§impl Clone for BasicTileset
impl Clone for BasicTileset
source§fn clone(&self) -> BasicTileset
fn clone(&self) -> BasicTileset
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for BasicTileset
impl Debug for BasicTileset
source§impl<'de> Deserialize<'de> for BasicTileset
impl<'de> Deserialize<'de> for BasicTileset
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<BasicTileset, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<BasicTileset, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl PartialEq<BasicTileset> for BasicTileset
impl PartialEq<BasicTileset> for BasicTileset
source§fn eq(&self, other: &BasicTileset) -> bool
fn eq(&self, other: &BasicTileset) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for BasicTileset
impl StructuralEq for BasicTileset
impl StructuralPartialEq for BasicTileset
Auto Trait Implementations§
impl RefUnwindSafe for BasicTileset
impl Send for BasicTileset
impl Sync for BasicTileset
impl Unpin for BasicTileset
impl UnwindSafe for BasicTileset
Blanket Implementations§
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.