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
AdwTimedAnimationonwidgetto animatetargetfromfromtoto.- 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
selfchanges direction on every iteration.- Parameters:
alternate – whether
selfalternates
- 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
selfwill use.See
Easingfor 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
selfwill play.If set to 0,
selfwill repeat endlessly.- Parameters:
repeat_count – the number of times
selfwill play
- set_reverse(reverse: bool) None#
Sets whether
selfplays backwards.- Parameters:
reverse – whether
selfplays backwards
- set_value_from(value: float) None#
Sets the value
selfwill animate from.The animation will start at this value and end at
value_to.If
reverseisTRUE, the animation will end at this value instead.- Parameters:
value – the value to animate from
- set_value_to(value: float) None#
Sets the value
selfwill animate to.The animation will start at
value_fromand end at this value.If
reverseisTRUE, the animation will start at this value instead.- Parameters:
value – the value to animate to
Properties#
- class TimedAnimation