From e7d1458298318dad8eb046540162323dc1a76b25 Mon Sep 17 00:00:00 2001 From: Samuel Degrande Date: Mon, 1 Dec 2014 20:18:46 +0100 Subject: [PATCH] Easing modes are not used when computing the value of a KeyframeTransition An easing mode can be set on a frame of a KeyframeTransition. However, the progress value of the current frame is computed using using a linear function. This patch adds a call to clutter_easing_for_mode() to compute the actual progress value. Note that parametrized easing modes (bezier and 'step') are not taken into account. https://bugzilla.gnome.org/show_bug.cgi?id=740997 --- clutter/clutter-keyframe-transition.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clutter/clutter-keyframe-transition.c b/clutter/clutter-keyframe-transition.c index cef39fc55..54b670b73 100644 --- a/clutter/clutter-keyframe-transition.c +++ b/clutter/clutter-keyframe-transition.c @@ -295,8 +295,8 @@ clutter_keyframe_transition_compute_value (ClutterTransition *transition, /* update the interval to be used to interpolate the property */ real_interval = cur_frame->interval; - /* normalize the progress */ - real_progress = (p - cur_frame->start) / (cur_frame->end - cur_frame->start); + /* normalize the progress and apply the easing mode */ + real_progress = clutter_easing_for_mode ( cur_frame->mode, (p - cur_frame->start), (cur_frame->end - cur_frame->start)); #ifdef CLUTTER_ENABLE_DEBUG if (CLUTTER_HAS_DEBUG (ANIMATION))