pub struct LevelBgPosInfos {
pub scale: Vec<f32>,
pub crop_rect: Vec<f32>,
pub top_left_px: Vec<i32>,
}
Expand description
Level background image position info
Fields§
§scale: Vec<f32>
An array containing the [scaleX,scaleY]
values of the cropped background image, depending on bgPos
option.
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.
Trait Implementations§
Source§impl Clone for LevelBgPosInfos
impl Clone for LevelBgPosInfos
Source§fn clone(&self) -> LevelBgPosInfos
fn clone(&self) -> LevelBgPosInfos
Returns a duplicate 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 LevelBgPosInfos
impl Debug for LevelBgPosInfos
Source§impl<'de> Deserialize<'de> for LevelBgPosInfos
impl<'de> Deserialize<'de> for LevelBgPosInfos
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for LevelBgPosInfos
impl RefUnwindSafe for LevelBgPosInfos
impl Send for LevelBgPosInfos
impl Sync for LevelBgPosInfos
impl Unpin for LevelBgPosInfos
impl UnwindSafe for LevelBgPosInfos
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more