#[repr(C)]pub struct FlipTransform {
pub translate_x: f32,
pub translate_y: f32,
pub scale_x: f32,
pub scale_y: f32,
}Expand description
The inverted transform of a FLIP move.
“First” is the element’s original position. “Last” is its new position after layout. FLIP animation works by placing the element at Last, then applying a transform to make it look like it’s at First, and finally animating that transform down to zero. This allows elements to move smoothly on the GPU without triggering expensive layout recalculations on every frame.
Fields§
§translate_x: f32Horizontal offset, logical px.
translate_y: f32Vertical offset, logical px.
scale_x: f32Horizontal scale, 1.0 = unchanged.
scale_y: f32Vertical scale, 1.0 = unchanged.
Implementations§
Source§impl FlipTransform
impl FlipTransform
Sourcepub fn is_identity(&self) -> bool
pub fn is_identity(&self) -> bool
Whether this is close enough to identity.
Trait Implementations§
Source§impl Clone for FlipTransform
impl Clone for FlipTransform
Source§fn clone(&self) -> FlipTransform
fn clone(&self) -> FlipTransform
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 moreimpl Copy for FlipTransform
Source§impl Debug for FlipTransform
impl Debug for FlipTransform
Source§impl Default for FlipTransform
impl Default for FlipTransform
Source§fn default() -> FlipTransform
fn default() -> FlipTransform
Returns the “default value” for a type. Read more
Source§impl PartialEq for FlipTransform
impl PartialEq for FlipTransform
impl StructuralPartialEq for FlipTransform
Auto Trait Implementations§
impl Freeze for FlipTransform
impl RefUnwindSafe for FlipTransform
impl Send for FlipTransform
impl Sync for FlipTransform
impl Unpin for FlipTransform
impl UnsafeUnpin for FlipTransform
impl UnwindSafe for FlipTransform
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