From: Emmanuele Bassi Date: Thu, 3 Jun 2010 14:20:17 +0000 (+0100) Subject: test-drag: Add desaturation effect X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=781a413362013bb8a49d668e44ff9a8c4dc31d30;p=profile%2Fivi%2Fclutter.git test-drag: Add desaturation effect Use a desaturation effect on the drag handle. --- diff --git a/tests/interactive/test-drag.c b/tests/interactive/test-drag.c index 2aa1d1d..08197c3 100644 --- a/tests/interactive/test-drag.c +++ b/tests/interactive/test-drag.c @@ -32,7 +32,10 @@ on_drag_begin (ClutterDragAction *action, clutter_drag_action_set_drag_handle (action, drag_handle); - clutter_actor_set_opacity (actor, 128); + /* fully desaturate the actor */ + clutter_actor_animate (actor, CLUTTER_LINEAR, 150, + "@effects.disable.factor", 1.0, + NULL); } static void @@ -68,14 +71,14 @@ on_drag_end (ClutterDragAction *action, &real_y); clutter_actor_animate (actor, CLUTTER_EASE_OUT_CUBIC, 150, - "opacity", 255, + "@effects.disable.factor", 0.0, "x", real_x, "y", real_y, NULL); } else clutter_actor_animate (actor, CLUTTER_LINEAR, 150, - "opacity", 255, + "@effects.disable.factor", 0.0, NULL); } @@ -165,6 +168,8 @@ test_drag_main (int argc, char *argv[]) clutter_actor_add_action (handle, action); + clutter_actor_add_effect_with_name (handle, "disable", clutter_desaturate_effect_new (0.0)); + clutter_actor_show (stage); clutter_main ();