pub struct TransformPivot {
pub px: (f64, f64),
pub frac: (f64, f64),
}Expand description
Punto de pivote de transform (CSS transform-origin). Cada eje se resuelve
contra el rect del nodo como px + frac · tamaño: px (ya escalado por zoom
por el caller) cubre offsets absolutos y frac los porcentuales (0.5 = 50%
del ancho/alto). El default CSS 50% 50% (centro) es
{ px: (0.0, 0.0), frac: (0.5, 0.5) }; un nodo con transform_origin: None
usa ese centro. Modela px + % por eje igual que transform_rel modela el
translate(<%>) — necesario porque el % depende del layout, desconocido hasta
paint.
Fields§
§px: (f64, f64)Offset absoluto en px (ya × zoom) por eje (x, y).
frac: (f64, f64)Fracción del tamaño del rect por eje (x, y) (0.5 = 50%).
Trait Implementations§
Source§impl Clone for TransformPivot
impl Clone for TransformPivot
Source§fn clone(&self) -> TransformPivot
fn clone(&self) -> TransformPivot
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 TransformPivot
Source§impl Debug for TransformPivot
impl Debug for TransformPivot
Source§impl Default for TransformPivot
impl Default for TransformPivot
Source§fn default() -> TransformPivot
fn default() -> TransformPivot
Returns the “default value” for a type. Read more
Source§impl PartialEq for TransformPivot
impl PartialEq for TransformPivot
Source§fn eq(&self, other: &TransformPivot) -> bool
fn eq(&self, other: &TransformPivot) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for TransformPivot
Auto Trait Implementations§
impl Freeze for TransformPivot
impl RefUnwindSafe for TransformPivot
impl Send for TransformPivot
impl Sync for TransformPivot
impl Unpin for TransformPivot
impl UnsafeUnpin for TransformPivot
impl UnwindSafe for TransformPivot
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
impl<T> Brush for T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.