2008-02-07 Tomas Frydrych <tf@openedhand.com>

* tests/test-actors.c:
	Reverted previous change.
This commit is contained in:
Tomas Frydrych 2008-02-07 17:04:43 +00:00
parent 2994de63ef
commit 18eef53cfc

View File

@ -97,7 +97,9 @@ frame_cb (ClutterTimeline *timeline,
clutter_actor_set_rotation (CLUTTER_ACTOR (oh->group), clutter_actor_set_rotation (CLUTTER_ACTOR (oh->group),
CLUTTER_Z_AXIS, CLUTTER_Z_AXIS,
frame_num, frame_num,
0, 0, 0); CLUTTER_STAGE_WIDTH () / 2,
CLUTTER_STAGE_HEIGHT () / 2,
0);
for (i = 0; i < n_hands; i++) for (i = 0; i < n_hands; i++)
{ {
@ -197,17 +199,20 @@ main (int argc, char *argv[])
h = clutter_actor_get_height (oh->hand[0]); h = clutter_actor_get_height (oh->hand[0]);
x = CLUTTER_STAGE_WIDTH () / 2 x = CLUTTER_STAGE_WIDTH () / 2
+ radius + radius
* cos (i * M_PI / (n_hands / 2)); * cos (i * M_PI / (n_hands / 2))
- w / 2;
y = CLUTTER_STAGE_HEIGHT () / 2 y = CLUTTER_STAGE_HEIGHT () / 2
+ radius + radius
* sin (i * M_PI / (n_hands / 2)); * 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_actor_move_anchor_point_from_gravity (oh->hand[i],
CLUTTER_GRAVITY_CENTER); CLUTTER_GRAVITY_CENTER);
clutter_actor_set_position (oh->hand[i], x, y);
/* Add to our group group */ /* Add to our group group */
clutter_container_add_actor (CLUTTER_CONTAINER (oh->group), oh->hand[i]); 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_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 */ /* Add the group to the stage */
clutter_container_add_actor (CLUTTER_CONTAINER (stage), clutter_container_add_actor (CLUTTER_CONTAINER (stage),
CLUTTER_ACTOR (oh->group)); CLUTTER_ACTOR (oh->group));