pub struct Transform { /* private fields */ }Expand description
A transform list. Fixed capacity, so styles stay Copy.
Implementations§
Source§impl Transform
impl Transform
Sourcepub fn ops(&self) -> &[TransformOp]
pub fn ops(&self) -> &[TransformOp]
The entries, in order.
Sourcepub fn push(&mut self, kind: TransformKind, value: f32) -> Option<u8>
pub fn push(&mut self, kind: TransformKind, value: f32) -> Option<u8>
Appends an entry; returns its index, or None when the list is full.
Sourcepub fn has_fractions(&self) -> bool
pub fn has_fractions(&self) -> bool
Whether some entry is a fraction of the view’s size.
Sourcepub fn resolve_fractions(&self, size: Size<Points>) -> Transform
pub fn resolve_fractions(&self, size: Size<Points>) -> Transform
The list with size fractions turned into points for a view of
size.
Sourcepub fn is_identity(&self) -> bool
pub fn is_identity(&self) -> bool
True if the list is empty or every entry is an identity.
Trait Implementations§
impl Copy for Transform
impl StructuralPartialEq for Transform
Auto Trait Implementations§
impl Forget for Transform
impl Freeze for Transform
impl Move 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