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>) -> Self
pub fn width(self, width: impl Into<Sizing>) -> Self
A crate::spec::Sizing, or a number of px, as on a spec.
Sourcepub fn height(self, height: impl Into<Sizing>) -> Self
pub fn height(self, height: impl Into<Sizing>) -> Self
A crate::spec::Sizing, or a number of px, as on a spec.
Sourcepub fn grow_width(self) -> Self
pub fn grow_width(self) -> Self
width(Sizing::GROW), as on a spec.
Sourcepub fn grow_height(self) -> Self
pub fn grow_height(self) -> Self
height(Sizing::GROW), as on a spec.
pub fn bg(self, bg: Color) -> Self
pub fn radius(self, radius: f32) -> Self
pub fn opacity(self, opacity: f32) -> Self
Methods from Deref<Target = Slots>§
pub fn width(self, width: Sizing) -> Self
pub fn height(self, height: Sizing) -> Self
pub fn bg(self, bg: Color) -> Self
pub fn radius(self, radius: f32) -> Self
pub fn opacity(self, opacity: f32) -> Self
pub fn rotate(self, turns: f32) -> Self
pub fn scale(self, scale: f32) -> Self
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
Mutably borrows from an owned value. Read more