[clutter/clutter-1.20] Easing modes are not used when computing the value of a KeyframeTransition



commit a924a74a45f4cd44ee4bbc160f183ec4bcbba6e6
Author: Samuel Degrande <samuel degrande lifl fr>
Date:   Mon Dec 1 20:18:46 2014 +0100

    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
    (cherry picked from commit e7d1458298318dad8eb046540162323dc1a76b25)
    Signed-off-by: Emmanuele Bassi <ebassi gnome org>

 clutter/clutter-keyframe-transition.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/clutter/clutter-keyframe-transition.c b/clutter/clutter-keyframe-transition.c
index cef39fc..54b670b 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))


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]