diff options
author | Samuel Degrande <samuel.degrande@lifl.fr> | 2014-12-01 20:18:46 +0100 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2015-01-09 11:51:25 +0000 |
commit | a924a74a45f4cd44ee4bbc160f183ec4bcbba6e6 (patch) | |
tree | 7b13cfd3818eee00eefdf5942bb5e80375293e18 | |
parent | 52f36dbd28c27118049fbb7320b16b924b781bff (diff) | |
download | clutter-a924a74a45f4cd44ee4bbc160f183ec4bcbba6e6.tar.gz |
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>
-rw-r--r-- | 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 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)) |