TimedAnimation#
Superclasses: Animation
, Object
A time-based Animation
.
AdwTimedAnimation
implements a simple animation interpolating the given
value from value_from
to
value_to
over
duration
milliseconds using the curve described by
easing
.
If reverse
is set to TRUE
, AdwTimedAnimation
will instead animate from value_to
to
value_from
, and the easing curve will be inverted.
The animation can repeat a certain amount of times, or endlessly, depending
on the repeat_count
value. If
alternate
is set to TRUE
, it will also change the
direction every other iteration.
Constructors#
- class TimedAnimation
- classmethod new(widget: Widget, from_: float, to: float, duration: int, target: AnimationTarget) Animation #
Creates a new
AdwTimedAnimation
onwidget
to animatetarget
fromfrom
toto
.- Parameters:
widget – a widget to create animation on
from
to – a value to animate to
duration – a duration for the animation
target – a target value to animate
Methods#
- class TimedAnimation
-
- set_alternate(alternate: bool) None #
Sets whether
self
changes direction on every iteration.- Parameters:
alternate – whether
self
alternates
- set_duration(duration: int) None #
Sets the duration of
self
.If the animation repeats more than once, sets the duration of one iteration.
- Parameters:
duration – the duration to use, in milliseconds
- set_easing(easing: Easing) None #
Sets the easing function
self
will use.See
Easing
for the description of specific easing functions.- Parameters:
easing – the easing function to use
- set_repeat_count(repeat_count: int) None #
Sets the number of times
self
will play.If set to 0,
self
will repeat endlessly.- Parameters:
repeat_count – the number of times
self
will play
- set_reverse(reverse: bool) None #
Sets whether
self
plays backwards.- Parameters:
reverse – whether
self
plays backwards
- set_value_from(value: float) None #
Sets the value
self
will animate from.The animation will start at this value and end at
value_to
.If
reverse
isTRUE
, the animation will end at this value instead.- Parameters:
value – the value to animate from
- set_value_to(value: float) None #
Sets the value
self
will animate to.The animation will start at
value_from
and end at this value.If
reverse
isTRUE
, the animation will start at this value instead.- Parameters:
value – the value to animate to
Properties#
- class TimedAnimation