[][src]Struct tiled_json_rs::Layer

pub struct Layer {
    pub name: String,
    pub offset_x: f32,
    pub offset_y: f32,
    pub opacity: f32,
    pub properties: HashMap<String, TiledValue>,
    pub layer_type: LayerType,
    pub x: i32,
    pub y: i32,
}

A map can contain any number of layers.

Layers have sub-types such as (enum) LayerType::TileLayer(TileLayer) which contains the data for that sub-type.

Fields

name: Stringoffset_x: f32

Horizontal layer offset in pixels (default: 0)

offset_y: f32

Vertical layer offset in pixels (default: 0)

opacity: f32

Value between 0 and 1

properties: HashMap<String, TiledValue>layer_type: LayerType

The LayerType object also contains the data relating to the type

x: i32

Horizontal layer offset in tiles. Always 0.

y: i32

Vertical layer offset in tiles. Always 0.

Trait Implementations

impl PartialEq<Layer> for Layer[src]

impl Clone for Layer[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Debug for Layer[src]

impl<'de> Deserialize<'de> for Layer[src]

Auto Trait Implementations

impl Send for Layer

impl Unpin for Layer

impl Sync for Layer

impl UnwindSafe for Layer

impl RefUnwindSafe for Layer

Blanket Implementations

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]