[clutter] timeline: Ensure the range on the cubic bezier control points
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter] timeline: Ensure the range on the cubic bezier control points
- Date: Fri, 5 Apr 2013 16:50:45 +0000 (UTC)
commit 0538adc58cd7cea4751bc46964a53c7950a00250
Author: Emmanuele Bassi <ebassi gnome org>
Date: Fri Apr 5 15:35:15 2013 +0100
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 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/clutter/clutter-timeline.c b/clutter/clutter-timeline.c
index 513d82e..440b2d2 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);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]