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 Clone for LevelBgPosInfos
[src]fn clone(&self) -> LevelBgPosInfos
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'de> Deserialize<'de> for LevelBgPosInfos
[src]
impl<'de> Deserialize<'de> for LevelBgPosInfos
[src]fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl Serialize for LevelBgPosInfos
[src]
impl Serialize for LevelBgPosInfos
[src]Auto Trait Implementations
impl RefUnwindSafe for LevelBgPosInfos
impl RefUnwindSafe for LevelBgPosInfos
impl Send for LevelBgPosInfos
impl Send for LevelBgPosInfos
impl Sync for LevelBgPosInfos
impl Sync for LevelBgPosInfos
impl Unpin for LevelBgPosInfos
impl Unpin for LevelBgPosInfos
impl UnwindSafe for LevelBgPosInfos
impl UnwindSafe for LevelBgPosInfos
Blanket Implementations
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]