mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 19:42:05 +00:00
timeline: Ensure the range on the cubic bezier control points
The X coordinate has to be in the [ 0.0, 1.0 ] range.
This commit is contained in:
parent
8c32637eea
commit
0538adc58c
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user