2008-11-07 14:32:28 -05:00
|
|
|
#include <gmodule.h>
|
2007-06-28 04:16:10 -04:00
|
|
|
#include <clutter/clutter.h>
|
|
|
|
|
2008-11-07 14:32:28 -05:00
|
|
|
G_MODULE_EXPORT int
|
|
|
|
test_perspective_main (int argc, char *argv[])
|
2007-06-28 04:16:10 -04:00
|
|
|
{
|
|
|
|
ClutterActor *rect;
|
|
|
|
ClutterActor *stage;
|
|
|
|
ClutterColor red = {0xff, 0, 0, 0xff}, white = {0xff, 0xff, 0xff, 0xff};
|
|
|
|
|
|
|
|
clutter_init (&argc, &argv);
|
|
|
|
|
|
|
|
stage = clutter_stage_get_default ();
|
|
|
|
clutter_stage_set_color (CLUTTER_STAGE (stage), &red);
|
2009-06-09 09:05:03 -04:00
|
|
|
clutter_stage_set_fullscreen (CLUTTER_STAGE (stage), TRUE);
|
2007-06-28 04:16:10 -04:00
|
|
|
|
|
|
|
rect = clutter_rectangle_new_with_color (&white);
|
|
|
|
clutter_actor_set_size (rect,
|
|
|
|
clutter_actor_get_width(stage),
|
|
|
|
clutter_actor_get_height(stage));
|
|
|
|
clutter_actor_set_position (rect, 0, 0);
|
|
|
|
clutter_group_add (CLUTTER_GROUP (stage), rect);
|
|
|
|
|
|
|
|
rect = clutter_rectangle_new_with_color (&red);
|
|
|
|
clutter_actor_set_size (rect, 2, 2);
|
2007-06-28 04:24:45 -04:00
|
|
|
clutter_actor_set_position (rect, 1, 1);
|
2007-06-28 04:16:10 -04:00
|
|
|
clutter_group_add (CLUTTER_GROUP (stage), rect);
|
|
|
|
|
|
|
|
rect = clutter_rectangle_new_with_color (&red);
|
|
|
|
clutter_actor_set_size (rect, 2, 2);
|
2007-06-28 04:24:45 -04:00
|
|
|
clutter_actor_set_position (rect, clutter_actor_get_width(stage)-3, 1);
|
2007-06-28 04:16:10 -04:00
|
|
|
clutter_group_add (CLUTTER_GROUP (stage), rect);
|
|
|
|
|
|
|
|
rect = clutter_rectangle_new_with_color (&red);
|
|
|
|
clutter_actor_set_size (rect, 2, 2);
|
2007-06-28 04:24:45 -04:00
|
|
|
clutter_actor_set_position (rect, 1, clutter_actor_get_height(stage)-3);
|
2007-06-28 04:16:10 -04:00
|
|
|
clutter_group_add (CLUTTER_GROUP (stage), rect);
|
|
|
|
|
|
|
|
rect = clutter_rectangle_new_with_color (&red);
|
|
|
|
clutter_actor_set_size (rect, 2, 2);
|
|
|
|
clutter_actor_set_position (rect,
|
2007-06-28 04:24:45 -04:00
|
|
|
clutter_actor_get_width(stage)-3,
|
|
|
|
clutter_actor_get_height(stage)-3);
|
2007-06-28 04:16:10 -04:00
|
|
|
clutter_group_add (CLUTTER_GROUP (stage), rect);
|
|
|
|
|
|
|
|
clutter_actor_show_all (CLUTTER_ACTOR (stage));
|
|
|
|
|
|
|
|
clutter_main ();
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|