[][src]Struct tmx::layer::Layer

pub struct Layer {
    pub id: u32,
    pub name: String,
    pub x: i32,
    pub y: i32,
    pub width: i32,
    pub height: i32,
    pub visible: bool,
    pub locked: bool,
    pub opacity: f64,
    pub offset_x: f64,
    pub offset_y: f64,
    pub data: LayerData,
}

Fields

id: u32

Unique ID of the layer. Each layer that added to a map gets a unique id. Even if a layer is deleted, no layer ever gets the same ID. Can not be changed in Tiled. (since Tiled 1.2)

name: String

The name of the layer.

x: i32

The x coordinate of the layer in tiles. Defaults to 0 and can not be changed in Tiled.

y: i32

The y coordinate of the layer in tiles. Defaults to 0 and can not be changed in Tiled.

width: i32

The width of the layer in tiles. Always the same as the map width for fixed-size maps.

height: i32

The height of the layer in tiles. Always the same as the map height for fixed-size maps.

visible: boollocked: boolopacity: f64

The opacity of the layer as a value from 0 to 1. Defaults to 1.

offset_x: f64

Rendering offset for this layer in pixels. Defaults to 0. (since 0.14)

offset_y: f64

Rendering offset for this layer in pixels. Defaults to 0. (since 0.14)

data: LayerData

Trait Implementations

impl Clone for Layer[src]

impl Debug for Layer[src]

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

impl PartialEq<Layer> for Layer[src]

impl StructuralPartialEq for Layer[src]

Auto Trait Implementations

impl RefUnwindSafe for Layer

impl Send for Layer

impl Sync for Layer

impl Unpin for Layer

impl UnwindSafe for Layer

Blanket Implementations

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

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

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

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

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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.