From 1b2606a850288b2f8f943ae2e433b14e34a944f7 Mon Sep 17 00:00:00 2001 From: Elliot Smith Date: Tue, 17 Aug 2010 10:56:06 +0100 Subject: [PATCH] cookbook: Modified ordering of statements in cross-fade example Changed the order of statements in the sample code to match the order they will be explained in the walk-through in the recipe. --- doc/cookbook/examples/textures-crossfade.c | 30 +++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/doc/cookbook/examples/textures-crossfade.c b/doc/cookbook/examples/textures-crossfade.c index 093c3e04e..94f6f4771 100644 --- a/doc/cookbook/examples/textures-crossfade.c +++ b/doc/cookbook/examples/textures-crossfade.c @@ -97,27 +97,27 @@ main (int argc, char *argv[]) clutter_container_add_actor (CLUTTER_CONTAINER (box), front); clutter_container_add_actor (CLUTTER_CONTAINER (stage), box); - /* animations */ - transitions = clutter_state_new (); - clutter_state_set (transitions, NULL, "show-front", - front, "opacity", CLUTTER_EASE_IN_CUBIC, 255, - back, "opacity", CLUTTER_EASE_IN_CUBIC, 0, - NULL); - clutter_state_set (transitions, NULL, "show-back", - front, "opacity", CLUTTER_LINEAR, 0, - back, "opacity", CLUTTER_LINEAR, 255, - NULL); - clutter_state_set_duration (transitions, NULL, NULL, duration); - - /* make the back opaque and front transparent */ - clutter_state_warp_to_state (transitions, "show-back"); - /* load the first image into the back */ load_image (CLUTTER_TEXTURE (back), source); /* load the second image into the front */ load_image (CLUTTER_TEXTURE (front), target); + /* animations */ + transitions = clutter_state_new (); + clutter_state_set (transitions, NULL, "show-back", + front, "opacity", CLUTTER_LINEAR, 0, + back, "opacity", CLUTTER_LINEAR, 255, + NULL); + clutter_state_set (transitions, NULL, "show-front", + front, "opacity", CLUTTER_EASE_IN_CUBIC, 255, + back, "opacity", CLUTTER_EASE_IN_CUBIC, 0, + NULL); + clutter_state_set_duration (transitions, NULL, NULL, duration); + + /* make the back opaque and front transparent */ + clutter_state_warp_to_state (transitions, "show-back"); + /* fade in the front texture and fade out the back texture */ clutter_state_set_state (transitions, "show-front");