Commit 635b8497 authored by Emmanuele Bassi's avatar Emmanuele Bassi

Fix for the smoothstep alpha function

When computing the increasing smoothstep alpha value use the right type
for the results, to avoid overflowing the [0, 0xffff] range of the alpha
value.

Also use the right format when printing out the opacity and alpha values
in the opacity behaviour.
parent b2cf2e05
2007-08-15 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-alpha.c (clutter_smoothstep_inc): Use the
correct type for parameters, to avoid overflow (Ali Sabil).
* clutter/clutter-behaviour-opacity.c: Use the right format
when printing the unsigned alpha value and opacity to the
debug output.
2007-08-14 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-container.[ch]:
......
......@@ -748,8 +748,8 @@ clutter_smoothstep_inc_func (ClutterAlpha *alpha,
ClutterTimeline *timeline;
gint frame;
gint n_frames;
gint32 r;
gint32 x;
guint32 r;
guint32 x;
/*
* The smoothstep function uses f(x) = -2x^3 + 3x^2 where x is from <0,1>,
......
......@@ -100,7 +100,9 @@ clutter_behaviour_alpha_notify (ClutterBehaviour *behave,
/ CLUTTER_ALPHA_MAX_ALPHA
+ priv->opacity_start;
CLUTTER_NOTE (BEHAVIOUR, "alpha: %i, opacity: %i", alpha_value, opacity);
CLUTTER_NOTE (BEHAVIOUR, "alpha: %u, opacity: %u",
alpha_value,
opacity);
clutter_behaviour_actors_foreach (behave,
alpha_notify_foreach,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment