Struct ldtk::LevelBgPosInfos[][src]

pub struct LevelBgPosInfos {
    pub crop_rect: Vec<f32>,
    pub top_left_px: Vec<i32>,
    pub scale: Vec<f32>,
}

Level background image position info

Fields

crop_rect: Vec<f32>

An array of 4 float values describing the cropped sub-rectangle of the displayed background image. This cropping happens when original is larger than the level bounds. Array format: [ cropX, cropY, cropWidth, cropHeight ]

top_left_px: Vec<i32>

An array containing the [x,y] pixel coordinates of the top-left corner of the cropped background image, depending on bgPos option.

scale: Vec<f32>

An array containing the [scaleX,scaleY] values of the cropped background image, depending on bgPos option.

Trait Implementations

impl Clone for LevelBgPosInfos[src]

impl Debug for LevelBgPosInfos[src]

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

impl Serialize for LevelBgPosInfos[src]

Auto Trait Implementations

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.