summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas/efl_canvas_animation_player.c
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2019-04-29 11:11:10 +0200
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-05-12 11:56:05 +0200
commit09a4731813cf643bb6ef81ae18888d437867e001 (patch)
tree334deb602e13bb813520b8e8e26372183459e451 /src/lib/evas/canvas/efl_canvas_animation_player.c
parent59f8516ec5d52bc774942b8988c768104c08d472 (diff)
efl_canvas_animation: reply on the correct API
the animation itself does not implement the player interface, and nothing forces it to do so. Additionally, we should ask the reference object for the current progress. Not the animation object. This fixes pos_set / pos_get. Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Differential Revision: https://phab.enlightenment.org/D8783
Diffstat (limited to 'src/lib/evas/canvas/efl_canvas_animation_player.c')
-rw-r--r--src/lib/evas/canvas/efl_canvas_animation_player.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/evas/canvas/efl_canvas_animation_player.c b/src/lib/evas/canvas/efl_canvas_animation_player.c
index 063f932d49..42fb2c4127 100644
--- a/src/lib/evas/canvas/efl_canvas_animation_player.c
+++ b/src/lib/evas/canvas/efl_canvas_animation_player.c
@@ -286,9 +286,9 @@ _efl_canvas_animation_player_efl_player_pos_get(const Eo *eo_obj,
286{ 286{
287 //TODO: this is not correct 287 //TODO: this is not correct
288 Efl_Canvas_Animation *anim = efl_animation_player_animation_get(eo_obj); 288 Efl_Canvas_Animation *anim = efl_animation_player_animation_get(eo_obj);
289 double length = efl_player_length_get(anim); 289 double length = efl_animation_duration_get(anim);
290 290
291 return length * efl_player_progress_get(anim); 291 return length * efl_player_progress_get(eo_obj);
292} 292}
293 293
294EOLIAN static void 294EOLIAN static void
@@ -301,7 +301,7 @@ _efl_canvas_animation_player_efl_player_pos_set(Eo *eo_obj,
301 return; 301 return;
302 302
303 EFL_ANIMATION_PLAYER_ANIMATION_GET(eo_obj, anim); 303 EFL_ANIMATION_PLAYER_ANIMATION_GET(eo_obj, anim);
304 double length = efl_player_length_get(anim); 304 double length = efl_animation_duration_get(anim);
305 pd->progress = sec / length; 305 pd->progress = sec / length;
306 efl_animation_apply(anim, pd->progress, efl_animation_player_target_get(eo_obj)); 306 efl_animation_apply(anim, pd->progress, efl_animation_player_target_get(eo_obj));
307} 307}