xartigas pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=8a5976666b1566f0025f9aff394002b766069beb
commit 8a5976666b1566f0025f9aff394002b766069beb Author: Xavi Artigas <[email protected]> Date: Wed Oct 30 18:47:07 2019 +0100 docs: Add caveat details to Efl.Canvas.Animation Summary: Regarding object properties not matching actual rendered values when animations are running. Depends on D10560 Reviewers: bu5hm4n, cedric, zmike, Jaehyun_Cho Reviewed By: bu5hm4n Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10566 --- src/lib/evas/canvas/efl_canvas_animation.eo | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/lib/evas/canvas/efl_canvas_animation.eo b/src/lib/evas/canvas/efl_canvas_animation.eo index 987220bf4d..f8c371c0c9 100644 --- a/src/lib/evas/canvas/efl_canvas_animation.eo +++ b/src/lib/evas/canvas/efl_canvas_animation.eo @@ -1,4 +1,5 @@ import efl_canvas_animation_types; +parse efl_canvas_animation_player; class @beta Efl.Canvas.Animation extends Efl.Object implements Efl.Playable { @@ -10,12 +11,25 @@ class @beta Efl.Canvas.Animation extends Efl.Object implements Efl.Playable evolves from $[0] to $[1]. For example implementations see @Efl.Canvas.Animation_Translate or @Efl.Canvas.Animation_Scale. + + Note: Unless @.final_state_keep is used, when an animation finishes any effect it introduced on the object is + removed. This means that if the animation does not end in the object's initial state there will be a noticeable + sudden jump. + To avoid this, animations must finish in the same state as they begin, or the object's state must be + matched to the animation's ending state once the animation finishes (using the @[Efl.Canvas.Animation_Player.ended] + event). ]] c_prefix: efl_animation; methods { @property final_state_keep { [[If $true the last mapping state the animation applies will be kept. - Otherwise all the @Efl.Gfx.Mapping properties will be reset when the animation ends.]] + Otherwise all the @Efl.Gfx.Mapping properties will be reset when the animation ends. + + Be careful, though. Object properties like @Efl.Gfx.Entity.position do not take + animations into account so they might not match the actual rendered values. + It is usually better to remove the effects of the animation as soon as it finishes + and set the final values on the object's properties. + ]] set { } get { --
