AnimationStyle
Used to override the default parameters of an animation.
Note
If duration and reverse_duration are set to
Duration(), the corresponding animation will be disabled.
See no_animation() method for a convenient way to create
such an instance.
Properties
-
curve(Optional[AnimationCurve]) –The curve to use for the animation.
-
duration(Optional[DurationValue]) –The duration of the animation.
-
reverse_curve(Optional[AnimationCurve]) –The curve to use for the reverse animation.
-
reverse_duration(Optional[DurationValue]) –The duration of the reverse animation.
Methods
-
copy–Returns a copy of this object with the specified properties overridden.
-
no_animation–Creates an instance of
AnimationStylewith no animation.
Properties#
curve
class-attribute
instance-attribute
#
curve: Optional[AnimationCurve] = None
The curve to use for the animation.
duration
class-attribute
instance-attribute
#
duration: Optional[DurationValue] = None
The duration of the animation.
reverse_curve
class-attribute
instance-attribute
#
reverse_curve: Optional[AnimationCurve] = None
The curve to use for the reverse animation.
reverse_duration
class-attribute
instance-attribute
#
reverse_duration: Optional[DurationValue] = None
The duration of the reverse animation.
Methods#
copy
#
copy(
*,
duration: Optional[DurationValue] = None,
reverse_duration: Optional[DurationValue] = None,
curve: Optional[AnimationCurve] = None,
reverse_curve: Optional[AnimationCurve] = None,
) -> AnimationStyle
Returns a copy of this object with the specified properties overridden.
no_animation
staticmethod
#
no_animation() -> AnimationStyle
Creates an instance of AnimationStyle with no animation.