From 20d1d24e3801890b8f692e76372fb19299274eb4 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Fri, 6 Jul 2012 18:06:33 +0100 Subject: [PATCH] examples: Use pivot point, not anchor point https://bugzilla.gnome.org/show_bug.cgi?id=677853 --- examples/basic-actor.c | 2 +- examples/bin-layout.c | 2 +- examples/easing-modes.c | 3 ++- examples/threads.c | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/examples/basic-actor.c b/examples/basic-actor.c index f1e37ca32..0ce396717 100644 --- a/examples/basic-actor.c +++ b/examples/basic-actor.c @@ -138,7 +138,7 @@ main (int argc, char *argv[]) clutter_actor_set_size (flowers[2], SIZE, SIZE); clutter_actor_set_margin_right (flowers[2], 12); clutter_actor_set_background_color (flowers[2], CLUTTER_COLOR_Green); - clutter_actor_set_pivot_point (flowers[2], 0.5, 0.5); + clutter_actor_set_pivot_point (flowers[2], 0.5f, 0.0f); clutter_actor_set_reactive (flowers[2], TRUE); clutter_actor_add_child (vase, flowers[2]); g_signal_connect (flowers[2], "button-press-event", diff --git a/examples/bin-layout.c b/examples/bin-layout.c index 048f3b4c9..7dc9b967d 100644 --- a/examples/bin-layout.c +++ b/examples/bin-layout.c @@ -190,7 +190,7 @@ main (int argc, char *argv[]) */ box = clutter_actor_new (); clutter_actor_set_layout_manager (box, layout); - clutter_actor_set_anchor_point_from_gravity (box, CLUTTER_GRAVITY_CENTER); + clutter_actor_add_constraint (box, clutter_align_constraint_new (stage, CLUTTER_ALIGN_BOTH, 0.5)); clutter_actor_set_position (box, 320, 240); clutter_actor_set_reactive (box, TRUE); clutter_actor_set_name (box, "box"); diff --git a/examples/easing-modes.c b/examples/easing-modes.c index 5393e7216..2a2e23359 100644 --- a/examples/easing-modes.c +++ b/examples/easing-modes.c @@ -158,7 +158,8 @@ make_bouncer (gfloat width, clutter_actor_set_name (retval, "bouncer"); clutter_actor_set_size (retval, width, height); - clutter_actor_set_anchor_point (retval, width / 2, height / 2); + clutter_actor_set_pivot_point (retval, 0.5f, 0.5f); + clutter_actor_set_translation (retval, width / -2.f, height / -2.f, 0.f); clutter_actor_set_reactive (retval, TRUE); clutter_actor_set_content (retval, canvas); diff --git a/examples/threads.c b/examples/threads.c index 59abb80ac..7a1e71e5c 100644 --- a/examples/threads.c +++ b/examples/threads.c @@ -256,7 +256,7 @@ main (int argc, char *argv[]) clutter_actor_set_background_color (rect, CLUTTER_COLOR_LightScarletRed); clutter_actor_set_position (rect, 75, 150); clutter_actor_set_size (rect, 50, 50); - clutter_actor_set_anchor_point (rect, 25, 25); + clutter_actor_set_pivot_point (rect, .5f, .5f); clutter_actor_set_opacity (rect, 224); clutter_actor_add_child (stage, rect);