pub struct Transform {
pub position: (f32, f32),
pub scale: (f32, f32),
pub rotation: f32,
pub anchor: (f32, f32),
pub skew: (f32, f32),
}Expand description
Affine placement on the canvas. Applied in this order: translate → anchor-relative rotate → scale → skew.
Fields§
§position: (f32, f32)§scale: (f32, f32)§rotation: f32Radians, counter-clockwise, around anchor.
anchor: (f32, f32)Pivot point in normalised object-local coordinates (0..=1).
(0.5, 0.5) is the object centre.
skew: (f32, f32)Shear in radians, per axis.
Implementations§
Trait Implementations§
impl Copy for Transform
impl StructuralPartialEq for Transform
Auto Trait Implementations§
impl Freeze for Transform
impl RefUnwindSafe for Transform
impl Send for Transform
impl Sync for Transform
impl Unpin for Transform
impl UnsafeUnpin for Transform
impl UnwindSafe for Transform
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