pub struct FractionalRenderTransformProps {
pub layout: LayoutStyle,
pub translate_x_fraction: f32,
pub translate_y_fraction: f32,
}Expand description
Render transform wrapper for declarative element subtrees.
This is a convenience wrapper for cases where the desired translation is best expressed as a fraction of the element’s own laid-out bounds, similar to CSS percentage translate operations.
This is computed during layout so the first painted frame can use the correct pixel offset.
Fields§
§layout: LayoutStyle§translate_x_fraction: f32Translation in units of the element’s own width (e.g. -1.0 shifts left by one full width).
translate_y_fraction: f32Translation in units of the element’s own height.
Trait Implementations§
Source§impl Clone for FractionalRenderTransformProps
impl Clone for FractionalRenderTransformProps
Source§fn clone(&self) -> FractionalRenderTransformProps
fn clone(&self) -> FractionalRenderTransformProps
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 Default for FractionalRenderTransformProps
impl Default for FractionalRenderTransformProps
Source§fn default() -> FractionalRenderTransformProps
fn default() -> FractionalRenderTransformProps
Returns the “default value” for a type. Read more
impl Copy for FractionalRenderTransformProps
Auto Trait Implementations§
impl Freeze for FractionalRenderTransformProps
impl RefUnwindSafe for FractionalRenderTransformProps
impl Send for FractionalRenderTransformProps
impl Sync for FractionalRenderTransformProps
impl Unpin for FractionalRenderTransformProps
impl UnsafeUnpin for FractionalRenderTransformProps
impl UnwindSafe for FractionalRenderTransformProps
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