Struct libbismuth::builders::TimedAnimationBuilder
source · pub struct TimedAnimationBuilder { /* private fields */ }
Expand description
A builder-pattern type to construct TimedAnimation
objects.
Implementations§
source§impl TimedAnimationBuilder
impl TimedAnimationBuilder
sourcepub fn alternate(self, alternate: bool) -> Self
pub fn alternate(self, alternate: bool) -> Self
Whether the animation changes direction on every iteration.
sourcepub fn duration(self, duration: u32) -> Self
pub fn duration(self, duration: u32) -> Self
Duration of the animation, in milliseconds.
Describes how much time the animation will take.
If the animation repeats more than once, describes the duration of one iteration.
sourcepub fn easing(self, easing: Easing) -> Self
pub fn easing(self, easing: Easing) -> Self
Easing function used in the animation.
Describes the curve the value is interpolated on.
See Easing
for the description of specific easing functions.
sourcepub fn repeat_count(self, repeat_count: u32) -> Self
pub fn repeat_count(self, repeat_count: u32) -> Self
Number of times the animation will play.
If set to 0, the animation will repeat endlessly.
sourcepub fn value_from(self, value_from: f64) -> Self
pub fn value_from(self, value_from: f64) -> Self
sourcepub fn value_to(self, value_to: f64) -> Self
pub fn value_to(self, value_to: f64) -> Self
The value to animate to.
The animation will start at value-from
and end at
this value.
If reverse
is TRUE
, the animation will start
at this value instead.
sourcepub fn target(self, target: &impl IsA<AnimationTarget>) -> Self
pub fn target(self, target: &impl IsA<AnimationTarget>) -> Self
The target to animate.
sourcepub fn widget(self, widget: &impl IsA<Widget>) -> Self
pub fn widget(self, widget: &impl IsA<Widget>) -> Self
The animation widget.
It provides the frame clock for the animation. It’s not strictly necessary for this widget to be same as the one being animated.
The widget must be mapped in order for the animation to work. If it’s not mapped, or if it gets unmapped during an ongoing animation, the animation will be automatically skipped.
sourcepub fn build(self) -> TimedAnimation
pub fn build(self) -> TimedAnimation
Build the TimedAnimation
.