[docs] Fix the examples for animate()
Update the examples to reference to existing easing modes and to make sure to use floating point values for floating point properties.
This commit is contained in:
parent
f25cdf066c
commit
8a794a8533
@ -1802,8 +1802,8 @@ clutter_actor_animate_with_timeline (ClutterActor *actor,
|
|||||||
*
|
*
|
||||||
* |[
|
* |[
|
||||||
* clutter_actor_animate (rectangle, CLUTTER_LINEAR, 250,
|
* clutter_actor_animate (rectangle, CLUTTER_LINEAR, 250,
|
||||||
* "width", 100,
|
* "width", 100.0,
|
||||||
* "height", 100,
|
* "height", 100.0,
|
||||||
* NULL);
|
* NULL);
|
||||||
* ]|
|
* ]|
|
||||||
*
|
*
|
||||||
@ -1819,8 +1819,8 @@ clutter_actor_animate_with_timeline (ClutterActor *actor,
|
|||||||
* by the "fixed::" string, for instance:
|
* by the "fixed::" string, for instance:
|
||||||
*
|
*
|
||||||
* |[
|
* |[
|
||||||
* clutter_actor_animate (actor, CLUTTER_EASE_IN, 100,
|
* clutter_actor_animate (actor, CLUTTER_EASE_IN_SINE, 100,
|
||||||
* "rotation-angle-z", 360,
|
* "rotation-angle-z", 360.0,
|
||||||
* "fixed::rotation-center-z", &center,
|
* "fixed::rotation-center-z", &center,
|
||||||
* NULL);
|
* NULL);
|
||||||
* ]|
|
* ]|
|
||||||
@ -1849,7 +1849,7 @@ clutter_actor_animate_with_timeline (ClutterActor *actor,
|
|||||||
* clutter_actor_hide (actor);
|
* clutter_actor_hide (actor);
|
||||||
* }
|
* }
|
||||||
*
|
*
|
||||||
* clutter_actor_animate (actor, CLUTTER_EASE_IN, 100,
|
* clutter_actor_animate (actor, CLUTTER_EASE_IN_CUBIC, 100,
|
||||||
* "opacity", 0,
|
* "opacity", 0,
|
||||||
* "signal::completed", on_animation_completed, actor,
|
* "signal::completed", on_animation_completed, actor,
|
||||||
* NULL);
|
* NULL);
|
||||||
@ -1869,13 +1869,13 @@ clutter_actor_animate_with_timeline (ClutterActor *actor,
|
|||||||
*
|
*
|
||||||
* |[
|
* |[
|
||||||
* clutter_actor_animate (actor, CLUTTER_LINEAR, 250,
|
* clutter_actor_animate (actor, CLUTTER_LINEAR, 250,
|
||||||
* "width", 100,
|
* "width", 100.0,
|
||||||
* "height", 100,
|
* "height", 100.0,
|
||||||
* NULL);
|
* NULL);
|
||||||
* clutter_actor_animate (actor, CLUTTER_EASE_IN_CUBIC, 500,
|
* clutter_actor_animate (actor, CLUTTER_EASE_IN_CUBIC, 500,
|
||||||
* "x", 100,
|
* "x", 100.0,
|
||||||
* "y", 100,
|
* "y", 100.0,
|
||||||
* "width", 200,
|
* "width", 200.0,
|
||||||
* NULL);
|
* NULL);
|
||||||
* ]|
|
* ]|
|
||||||
*
|
*
|
||||||
@ -1883,10 +1883,10 @@ clutter_actor_animate_with_timeline (ClutterActor *actor,
|
|||||||
*
|
*
|
||||||
* |[
|
* |[
|
||||||
* clutter_actor_animate (actor, CLUTTER_EASE_IN_CUBIC, 500,
|
* clutter_actor_animate (actor, CLUTTER_EASE_IN_CUBIC, 500,
|
||||||
* "x", 100,
|
* "x", 100.0,
|
||||||
* "y", 100,
|
* "y", 100.0,
|
||||||
* "width", 200,
|
* "width", 200.0,
|
||||||
* "height", 100,
|
* "height", 100.0,
|
||||||
* NULL);
|
* NULL);
|
||||||
* ]|
|
* ]|
|
||||||
*
|
*
|
||||||
@ -1907,15 +1907,15 @@ clutter_actor_animate_with_timeline (ClutterActor *actor,
|
|||||||
* ClutterActor *actor)
|
* ClutterActor *actor)
|
||||||
* {
|
* {
|
||||||
* clutter_actor_animate (actor, CLUTTER_EASE_OUT_CUBIC, 250,
|
* clutter_actor_animate (actor, CLUTTER_EASE_OUT_CUBIC, 250,
|
||||||
* "x", 500,
|
* "x", 500.0,
|
||||||
* "y", 500,
|
* "y", 500.0,
|
||||||
* NULL);
|
* NULL);
|
||||||
* }
|
* }
|
||||||
*
|
*
|
||||||
* ...
|
* ...
|
||||||
* animation = clutter_actor_animate (actor, CLUTTER_EASE_IN_CUBIC, 250,
|
* animation = clutter_actor_animate (actor, CLUTTER_EASE_IN_CUBIC, 250,
|
||||||
* "x", 100,
|
* "x", 100.0,
|
||||||
* "y", 100,
|
* "y", 100.0,
|
||||||
* NULL);
|
* NULL);
|
||||||
* g_signal_connect (animation, "completed",
|
* g_signal_connect (animation, "completed",
|
||||||
* G_CALLBACK (on_animation_completed),
|
* G_CALLBACK (on_animation_completed),
|
||||||
|
Loading…
Reference in New Issue
Block a user