pub struct OverlayAnimations {
pub opacity: Option<AnimTrack<f32>>,
pub position: Option<AnimTrack<[f32; 2]>>,
pub size: Option<AnimTrack<[f32; 2]>>,
pub fill: Option<AnimTrack<[f32; 4]>>,
pub border: Option<AnimTrack<[f32; 4]>>,
pub rotation: Option<AnimTrack<f32>>,
pub opacity_path: Option<PathTrack<f32>>,
pub position_path: Option<PathTrack<[f32; 2]>>,
pub size_path: Option<PathTrack<[f32; 2]>>,
pub fill_path: Option<PathTrack<[f32; 4]>>,
pub border_path: Option<PathTrack<[f32; 4]>>,
pub rotation_path: Option<PathTrack<f32>>,
}Expand description
Multi-channel animation tracks attached to an [OverlayShapeItem].
Each Some track replaces the matching field on the item for the frame.
Tracks are independent: a shape can simultaneously translate, scale,
recolour, and rotate.
Animation resolution is CPU-side in prepare(); the host must request
continuous repaints while any track is active.
Fields§
§opacity: Option<AnimTrack<f32>>Drives the item’s overall opacity multiplier. Takes precedence over
the legacy [OverlayShapeItem::animation] field when both are set.
position: Option<AnimTrack<[f32; 2]>>Drives position (top-left in logical pixels).
size: Option<AnimTrack<[f32; 2]>>Drives size (width / height in logical pixels).
fill: Option<AnimTrack<[f32; 4]>>Drives the item’s solid fill colour. Applies only when fill is a
solid colour; gradient fills are left alone.
border: Option<AnimTrack<[f32; 4]>>Drives border_colour.
rotation: Option<AnimTrack<f32>>Drives rotation in radians.
opacity_path: Option<PathTrack<f32>>Arbitrary path channel driving opacity. Overrides the linear
opacity track and the legacy animation field when set.
position_path: Option<PathTrack<[f32; 2]>>Arbitrary path channel driving position. Overrides the linear
position track when set.
size_path: Option<PathTrack<[f32; 2]>>Arbitrary path channel driving size. Overrides the linear
size track when set.
fill_path: Option<PathTrack<[f32; 4]>>Arbitrary path channel driving the solid fill colour. Overrides
the linear fill track when set.
border_path: Option<PathTrack<[f32; 4]>>Arbitrary path channel driving border_colour. Overrides the
linear border track when set.
rotation_path: Option<PathTrack<f32>>Arbitrary path channel driving rotation. Overrides the linear
rotation track when set.
Trait Implementations§
Source§impl Clone for OverlayAnimations
impl Clone for OverlayAnimations
Source§fn clone(&self) -> OverlayAnimations
fn clone(&self) -> OverlayAnimations
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for OverlayAnimations
impl Debug for OverlayAnimations
Source§impl Default for OverlayAnimations
impl Default for OverlayAnimations
Source§fn default() -> OverlayAnimations
fn default() -> OverlayAnimations
Auto Trait Implementations§
impl !RefUnwindSafe for OverlayAnimations
impl !UnwindSafe for OverlayAnimations
impl Freeze for OverlayAnimations
impl Send for OverlayAnimations
impl Sync for OverlayAnimations
impl Unpin for OverlayAnimations
impl UnsafeUnpin for OverlayAnimations
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>, which can then be
downcast into Box<dyn 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>, which 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.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.