mirror of
https://github.com/brl/mutter.git
synced 2024-12-02 04:40:43 -05:00
[tests] Animate the color during easing
The easing modes test should also tweak the color to show the progress of the animation.
This commit is contained in:
parent
2c95b378a5
commit
77579bbc5f
@ -83,13 +83,20 @@ on_button_press (ClutterActor *actor,
|
|||||||
{
|
{
|
||||||
ClutterAnimation *animation;
|
ClutterAnimation *animation;
|
||||||
ClutterAnimationMode cur_mode;
|
ClutterAnimationMode cur_mode;
|
||||||
|
ClutterColor color = { 0, 0, 0, 255 };
|
||||||
|
|
||||||
cur_mode = easing_modes[current_mode].mode;
|
cur_mode = easing_modes[current_mode].mode;
|
||||||
|
|
||||||
|
clutter_color_from_hls (&color,
|
||||||
|
g_random_double_range (0.0, 360.0),
|
||||||
|
g_random_double_range (0.0, 1.0),
|
||||||
|
g_random_double_range (0.0, 1.0));
|
||||||
|
|
||||||
animation =
|
animation =
|
||||||
clutter_actor_animate (rectangle, cur_mode, 2000,
|
clutter_actor_animate (rectangle, cur_mode, 2000,
|
||||||
"x", event->x,
|
"x", event->x,
|
||||||
"y", event->y,
|
"y", event->y,
|
||||||
|
"color", &color,
|
||||||
NULL);
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user