pub struct Keyframe {
pub at: Option<f32>,
pub dx: Option<f32>,
pub dy: Option<f32>,
pub slots: Slots,
}Expand description
One stop. Every field is optional: at resolves by position, and a
slot a stop doesn’t name is left to its neighbours. Derefs to its
Slots, so stop.bg reads the slot.
Fields§
§at: Option<f32>Position in the cycle, 0..=1; None spreads evenly.
dx: Option<f32>An offset from where layout put the node, logical px, as an
entrance’s dx/dy is (backlog F132): the node and its subtree
are drawn and hit that far away at this stop. One left out is 0,
the node’s own place, so a stop naming only dy bobs it upright.
dy: Option<f32>§slots: SlotsWidth, height, bg, radius, opacity, rotate and scale — the slots an entrance names too.
Implementations§
Source§impl Keyframe
impl Keyframe
Sourcepub fn width(self, width: impl Into<Sizing>) -> Keyframe
pub fn width(self, width: impl Into<Sizing>) -> Keyframe
A crate::spec::Sizing, or a number of px, as on a spec.
Sourcepub fn height(self, height: impl Into<Sizing>) -> Keyframe
pub fn height(self, height: impl Into<Sizing>) -> Keyframe
A crate::spec::Sizing, or a number of px, as on a spec.
Sourcepub fn grow_width(self) -> Keyframe
pub fn grow_width(self) -> Keyframe
width(Sizing::GROW), as on a spec.
Sourcepub fn grow_height(self) -> Keyframe
pub fn grow_height(self) -> Keyframe
height(Sizing::GROW), as on a spec.
pub fn bg(self, bg: Color) -> Keyframe
pub fn radius(self, radius: f32) -> Keyframe
Sourcepub fn rotate(self, turns: f32) -> Keyframe
pub fn rotate(self, turns: f32) -> Keyframe
A turn in turns clockwise (ADR 0043), as on a spec.
Sourcepub fn scale(self, scale: f32) -> Keyframe
pub fn scale(self, scale: f32) -> Keyframe
A uniform scale about the node’s pivot, as on a spec.
pub fn opacity(self, opacity: f32) -> Keyframe
Trait Implementations§
impl Copy for Keyframe
impl StructuralPartialEq for Keyframe
Auto Trait Implementations§
impl Freeze for Keyframe
impl RefUnwindSafe for Keyframe
impl Send for Keyframe
impl Sync for Keyframe
impl Unpin for Keyframe
impl UnsafeUnpin for Keyframe
impl UnwindSafe for Keyframe
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
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>
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>
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)
&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)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.