2008-02-07 Tomas Frydrych <tf@openedhand.com>
authorTomas Frydrych <tf@openedhand.com>
Thu, 7 Feb 2008 17:04:43 +0000 (17:04 +0000)
committerTomas Frydrych <tf@openedhand.com>
Thu, 7 Feb 2008 17:04:43 +0000 (17:04 +0000)
* tests/test-actors.c:
Reverted previous change.

tests/test-actors.c

index a5a1094..d3e3eb5 100644 (file)
@@ -97,7 +97,9 @@ frame_cb (ClutterTimeline *timeline,
   clutter_actor_set_rotation (CLUTTER_ACTOR (oh->group),
                               CLUTTER_Z_AXIS,
                               frame_num,
-                              0, 0, 0);
+                             CLUTTER_STAGE_WIDTH () / 2,
+                              CLUTTER_STAGE_HEIGHT () / 2,
+                             0);
 
   for (i = 0; i < n_hands; i++)
     {
@@ -197,17 +199,20 @@ main (int argc, char *argv[])
       h = clutter_actor_get_height (oh->hand[0]);
 
       x = CLUTTER_STAGE_WIDTH () / 2
-          + radius
-          * cos (i * M_PI / (n_hands / 2));
+       + radius
+       * cos (i * M_PI / (n_hands / 2))
+       - w / 2;
+
       y = CLUTTER_STAGE_HEIGHT () / 2
-          + radius
-          * sin (i * M_PI / (n_hands / 2));
+       + radius
+       * sin (i * M_PI / (n_hands / 2))
+       - h / 2;
+
+      clutter_actor_set_position (oh->hand[i], x, y);
 
       clutter_actor_move_anchor_point_from_gravity (oh->hand[i],
                                                   CLUTTER_GRAVITY_CENTER);
 
-      clutter_actor_set_position (oh->hand[i], x, y);
-
       /* Add to our group group */
       clutter_container_add_actor (CLUTTER_CONTAINER (oh->group), oh->hand[i]);
 
@@ -221,18 +226,6 @@ main (int argc, char *argv[])
 
   clutter_actor_show_all (oh->group);
 
-  clutter_actor_set_anchor_point_from_gravity (oh->group,
-                                              CLUTTER_GRAVITY_CENTER);
-  clutter_actor_set_position (oh->group,
-                             CLUTTER_STAGE_WIDTH()/2,
-                             CLUTTER_STAGE_HEIGHT()/2);
-
-  printf ("group %dx%d, stage %dx%d\n",
-         clutter_actor_get_width (oh->group),
-         clutter_actor_get_height (oh->group),
-         CLUTTER_STAGE_WIDTH(),
-         CLUTTER_STAGE_HEIGHT());
-
   /* Add the group to the stage */
   clutter_container_add_actor (CLUTTER_CONTAINER (stage),
                                CLUTTER_ACTOR (oh->group));