pub struct Transform2D {
pub previous: Option<Box<Transform2D>>,
pub rotate: Option<Rotation>,
pub translate: Option<[Size; 2]>,
pub anchor: Option<[Size; 2]>,
pub scale: Option<[Size; 2]>,
pub skew: Option<[Rotation; 2]>,
}Expand description
A sugared representation of an Affine transform combined with an anchor layout property.
Fields§
§previous: Option<Box<Transform2D>>Linked list of ancestral Transform2Ds
rotate: Option<Rotation>Represents affine rotation over z axis (single-dimensional for 2D rendering)
translate: Option<[Size; 2]>Represents affine translation across the x-y plane
anchor: Option<[Size; 2]>Represents the alignment of the (0,0) position of this element as it relates to its own bounding box. (origin offset)
scale: Option<[Size; 2]>Represents affine scale coefficients across the x-y plane
skew: Option<[Rotation; 2]>Represents affine skew over x and y axes
Implementations§
Source§impl Transform2D
impl Transform2D
Trait Implementations§
Source§impl Clone for Transform2D
impl Clone for Transform2D
Source§impl CoercionRules for Transform2D
impl CoercionRules for Transform2D
Source§impl Debug for Transform2D
impl Debug for Transform2D
Source§impl Default for Transform2D
impl Default for Transform2D
Source§impl<'de> Deserialize<'de> for Transform2D
impl<'de> Deserialize<'de> for Transform2D
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl HelperFunctions for Transform2D
impl HelperFunctions for Transform2D
Source§fn register_all_functions()
fn register_all_functions()
Registers all helper functions for this type.
Source§impl Interpolatable for Transform2D
impl Interpolatable for Transform2D
Source§fn interpolate(&self, _other: &Self, _t: f64) -> Self
fn interpolate(&self, _other: &Self, _t: f64) -> Self
Source§impl Mul for Transform2D
impl Mul for Transform2D
Source§impl Serialize for Transform2D
impl Serialize for Transform2D
Source§impl ToPaxValue for Transform2D
impl ToPaxValue for Transform2D
Source§fn to_pax_value(self) -> PaxValue
fn to_pax_value(self) -> PaxValue
Converts this value into a
PaxValue.Auto Trait Implementations§
impl Freeze for Transform2D
impl RefUnwindSafe for Transform2D
impl Send for Transform2D
impl Sync for Transform2D
impl Unpin for Transform2D
impl UnsafeUnpin for Transform2D
impl UnwindSafe for Transform2D
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> PropertyValue for T
Source§impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
impl<T, U> RoundInto<U> for Twhere
U: RoundFrom<T>,
Source§fn round_into(self) -> U
fn round_into(self) -> U
Performs the conversion.