2008-02-26 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-alpha.c: (clutter_exp_inc_func), (clutter_exp_dec_func): Clamp the value of the alpha function between [0, MAX_ALPHA]. (#800)
This commit is contained in:
parent
b5bcee6c6c
commit
1bef7d3a1a
@ -1,3 +1,9 @@
|
||||
2008-02-26 Emmanuele Bassi <ebassi@openedhand.com>
|
||||
|
||||
* clutter/clutter-alpha.c:
|
||||
(clutter_exp_inc_func), (clutter_exp_dec_func): Clamp the value
|
||||
of the alpha function between [0, MAX_ALPHA]. (#800)
|
||||
|
||||
2008-02-25 Emmanuele Bassi <ebassi@openedhand.com>
|
||||
|
||||
* clutter/clutter-main.c (emit_event): Fix the last commit
|
||||
|
@ -925,7 +925,7 @@ clutter_exp_inc_func (ClutterAlpha *alpha,
|
||||
|
||||
x = x_alpha_max * frame / n_frames;
|
||||
|
||||
result = clutter_pow2x (x) - 1;
|
||||
result = CLAMP (clutter_pow2x (x) - 1, 0, CLUTTER_ALPHA_MAX_ALPHA);
|
||||
|
||||
return result;
|
||||
}
|
||||
@ -976,7 +976,7 @@ clutter_exp_dec_func (ClutterAlpha *alpha,
|
||||
|
||||
x = (x_alpha_max * (n_frames - frame)) / n_frames;
|
||||
|
||||
result = clutter_pow2x (x) - 1;
|
||||
result = CLAMP (clutter_pow2x (x) - 1, 0, CLUTTER_ALPHA_MAX_ALPHA);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user