pub struct TransformValues {
pub scale_x: f32,
pub scale_y: f32,
pub rotation: f32,
}Expand description
The numbers a paint-time transform is made of that can sensibly be interpolated: a scale on each axis and a turn.
The pivot is not here, and that is the decision worth stating: it is a choice of origin, not a quantity. Interpolating it would move a shape across the screen while every number describing the shape stayed still, which is a thing no caller ever asks for and a thing nobody would be able to debug. A widget that wants the pivot to change has changed what it is doing, not how much of it.
Fields§
§scale_x: f32Horizontal scale; 1.0 is neutral.
scale_y: f32Vertical scale; 1.0 is neutral.
rotation: f32Clockwise turn, in radians.
Trait Implementations§
Source§impl Clone for TransformValues
impl Clone for TransformValues
impl Copy for TransformValues
Source§impl Debug for TransformValues
impl Debug for TransformValues
Source§impl Default for TransformValues
impl Default for TransformValues
Source§impl PartialEq for TransformValues
impl PartialEq for TransformValues
impl StructuralPartialEq for TransformValues
Auto Trait Implementations§
impl Freeze for TransformValues
impl RefUnwindSafe for TransformValues
impl Send for TransformValues
impl Sync for TransformValues
impl Unpin for TransformValues
impl UnsafeUnpin for TransformValues
impl UnwindSafe for TransformValues
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