pub struct TransformSource {
pub translate_x: Length,
pub translate_y: Length,
pub rotate: i32,
pub scale_x: i64,
pub scale_y: i64,
pub flip_x: bool,
pub flip_y: bool,
pub mirror: MirrorSource,
pub origin_x: Length,
pub origin_y: Length,
}Expand description
Declarative fixed-point transform resolved around an element-local origin.
Fields§
§translate_x: LengthHorizontal translation; percentages use element width.
translate_y: LengthVertical translation; percentages use element height.
rotate: i32Clockwise rotation in integer degrees.
scale_x: i64Horizontal scale in millionths (1_000_000 is 100%).
scale_y: i64Vertical scale in millionths (1_000_000 is 100%).
flip_x: boolExplicit horizontal flip.
flip_y: boolExplicit vertical flip.
mirror: MirrorSourceMirror shorthand composed with the flip flags.
origin_x: LengthHorizontal transform origin; defaults to 50%.
origin_y: LengthVertical transform origin; defaults to 50%.
Trait Implementations§
Source§impl Clone for TransformSource
impl Clone for TransformSource
Source§fn clone(&self) -> TransformSource
fn clone(&self) -> TransformSource
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 TransformSource
Source§impl Debug for TransformSource
impl Debug for TransformSource
Source§impl Default for TransformSource
impl Default for TransformSource
Source§impl<'de> Deserialize<'de> for TransformSourcewhere
TransformSource: Default,
impl<'de> Deserialize<'de> for TransformSourcewhere
TransformSource: Default,
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
impl Eq for TransformSource
Source§impl PartialEq for TransformSource
impl PartialEq for TransformSource
Source§impl Serialize for TransformSource
impl Serialize for TransformSource
impl StructuralPartialEq for TransformSource
Auto Trait Implementations§
impl Freeze for TransformSource
impl RefUnwindSafe for TransformSource
impl Send for TransformSource
impl Sync for TransformSource
impl Unpin for TransformSource
impl UnsafeUnpin for TransformSource
impl UnwindSafe for TransformSource
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>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
Source§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
Convert this type into
T, using the provided data to resolve any offsets.