Hi,
I'm developing an application that must rotate a card showing its
front and its back.
For this I'm creating a group which will contain the face and the back
of the cards as its children, using this snippet:
pixbuf_front = gdk_pixbuf_new_from_file ("card_front.png", NULL);
pixbuf_back = gdk_pixbuf_new_from_file ("card_back.png", NULL);
deck->front = clutter_texture_new_from_pixbuf (pixbuf_front);
deck->back = clutter_texture_new_from_pixbuf (pixbuf_back);
deck->card = clutter_group_new();
clutter_container_add_actor (CLUTTER_CONTAINER (deck->card), deck->front);
clutter_container_add_actor (CLUTTER_CONTAINER (deck->card), deck->back);
clutter_actor_lower (deck->front, deck->back);
clutter_actor_set_position (deck->card, x, y);
To rotate the card I'm adding this code on the timeline callback:
clutter_actor_set_rotation (deck->card, CLUTTER_Y_AXIS, - 6.0 *
frame_num, 0, 0, 0);
When the card rotates, I see the back of the card on the face and
back, if I add this code on the actor definition:
clutter_actor_raise (deck->front, deck->back);
I have the opposite behavior, I got the front on both sides of the card.
How could I achieve the desired behavior? I've tried deal with the
depth property but without success.
Thanks in advance,
Pedro Casagrande de Campos
--
To unsubscribe send a mail to [EMAIL PROTECTED]