mirror of
https://github.com/brl/mutter.git
synced 2025-01-22 17:38:56 +00:00
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.
This commit is contained in:
parent
b2cf2e057a
commit
635b84971d
@ -1,3 +1,12 @@
|
||||
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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user