From 0538adc58cd7cea4751bc46964a53c7950a00250 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Fri, 5 Apr 2013 15:35:15 +0100 Subject: [PATCH] timeline: Ensure the range on the cubic bezier control points The X coordinate has to be in the [ 0.0, 1.0 ] range. --- clutter/clutter-timeline.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/clutter/clutter-timeline.c b/clutter/clutter-timeline.c index 513d82e56..440b2d2e9 100644 --- a/clutter/clutter-timeline.c +++ b/clutter/clutter-timeline.c @@ -2496,6 +2496,11 @@ clutter_timeline_set_cubic_bezier_progress (ClutterTimeline *timeline, priv->cb_1 = *c_1; priv->cb_2 = *c_2; + + /* ensure the range on the X coordinate */ + priv->cb_1.x = CLAMP (priv->cb_1.x, 0.f, 1.f); + priv->cb_2.x = CLAMP (priv->cb_2.x, 0.f, 1.f); + clutter_timeline_set_progress_mode (timeline, CLUTTER_CUBIC_BEZIER); }