From da392e24a55ad34bdc8fe9ac0841eca574f76194 Mon Sep 17 00:00:00 2001 From: Neil Roberts Date: Wed, 27 Jan 2010 11:02:34 +0000 Subject: [PATCH] docs: Fix some of the examples for the animation docs In the example for clutter_actor_animate the "x" and "y" properties are floats so they need to be passed float values in the var args otherwise it will crash. There was also a missing comma. There were some other minor problems with the behaviours example which would cause it not to compile. --- doc/reference/clutter/clutter-animation-tutorial.xml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/doc/reference/clutter/clutter-animation-tutorial.xml b/doc/reference/clutter/clutter-animation-tutorial.xml index 306f81cf8..101e89573 100644 --- a/doc/reference/clutter/clutter-animation-tutorial.xml +++ b/doc/reference/clutter/clutter-animation-tutorial.xml @@ -298,13 +298,12 @@ main (int argc, char *argv[]) ClutterBehaviour *behave; ClutterAlpha *alpha; ClutterActor *stage, *actor; - GdkPixbuf *pixbuf; clutter_init (&argc, &argv); stage = clutter_stage_get_default (); - actor = clutter_texture_new_from_file ("ohpowers.png, NULL); + actor = clutter_texture_new_from_file ("ohpowers.png", NULL); clutter_container_add_actor (CLUTTER_CONTAINER (stage), actor); /* set up the animation to be 4 seconds long */ @@ -315,7 +314,7 @@ main (int argc, char *argv[]) * alpha will take a reference on the timeline so we can safely * release the reference we hold */ - alpha = clutter_alpha_new_full (timeline, CLUTTER_EASE_SINE_IN_OUT); + alpha = clutter_alpha_new_full (timeline, CLUTTER_EASE_IN_OUT_SINE); g_object_unref (timeline); /* the behaviour will own the alpha by sinking its floating @@ -385,9 +384,9 @@ main (int argc, char *argv[]) position and a new set of coordinates. The animation takes 200 milliseconds to complete and uses a linear progression. - clutter_actor_animate (actor, CLUTTER_LINEAR, 200 - "x", 200, - "y", 200, + clutter_actor_animate (actor, CLUTTER_LINEAR, 200, + "x", 200.0f, + "y", 200.0f, NULL);