pub struct ImageParameters {
pub width: u32,
pub height: u32,
pub frame_width: u32,
pub frame_height: u32,
pub first_frame: u32,
pub last_frame: u32,
pub column_major: bool,
}Expand description
Sprite sheet source image parameters defines how to interpret an image. It defines size of each frame, total size of an image, frame range to use, etc.
Fields§
§width: u32Width of an image in pixels.
height: u32Height of an image in pixels.
frame_width: u32Width of every frame in an image.
frame_height: u32Height of every frame in an image.
first_frame: u32Index of a first frame at which a produced animation should start.
last_frame: u32Index of a last frame at which a produced animation should end.
column_major: boolDefines how to interpret the image - is it pack in rows of frames or columns of frames.
Trait Implementations§
Source§impl Clone for ImageParameters
impl Clone for ImageParameters
Source§fn clone(&self) -> ImageParameters
fn clone(&self) -> ImageParameters
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ImageParameters
impl Debug for ImageParameters
impl Eq for ImageParameters
Source§impl PartialEq for ImageParameters
impl PartialEq for ImageParameters
Source§fn eq(&self, other: &ImageParameters) -> bool
fn eq(&self, other: &ImageParameters) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ImageParameters
Auto Trait Implementations§
impl Freeze for ImageParameters
impl RefUnwindSafe for ImageParameters
impl Send for ImageParameters
impl Sync for ImageParameters
impl Unpin for ImageParameters
impl UnsafeUnpin for ImageParameters
impl UnwindSafe for ImageParameters
Blanket Implementations§
Source§impl<T> AsyncTaskResult for T
impl<T> AsyncTaskResult for T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, U> ObjectOrVariant<T> for Uwhere
PhantomData<U>: ObjectOrVariantHelper<T, U>,
impl<T, U> ObjectOrVariant<T> for Uwhere
PhantomData<U>: ObjectOrVariantHelper<T, U>,
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.