2007-06-28 Matthew Allum <mallum@openedhand.com>
* tests/Makefile.am: * tests/test-perspective.c: Add simple perspective test
This commit is contained in:
parent
4bb51a4787
commit
acf4c2e070
@ -1,3 +1,9 @@
|
||||
2007-06-28 Matthew Allum <mallum@openedhand.com>
|
||||
|
||||
* tests/Makefile.am:
|
||||
* tests/test-perspective.c:
|
||||
Add simple perspective test
|
||||
|
||||
2007-06-27 Tomas Frydrych <tf@openedhand.com>
|
||||
|
||||
* clutter/clutter-actor.h:
|
||||
|
@ -1,6 +1,6 @@
|
||||
noinst_PROGRAMS = test-textures test-events test-offscreen test-scale \
|
||||
test-actors test-behave test-text test-entry test-project \
|
||||
test-boxes
|
||||
test-boxes test-perspective
|
||||
|
||||
INCLUDES = -I$(top_srcdir)/
|
||||
LDADD = $(top_builddir)/clutter/libclutter-@CLUTTER_FLAVOUR@-@CLUTTER_MAJORMINOR@.la
|
||||
@ -17,3 +17,4 @@ test_text_SOURCES = test-text.c
|
||||
test_entry_SOURCES = test-entry.c
|
||||
test_project_SOURCES = test-project.c
|
||||
test_boxes_SOURCES = test-boxes.c
|
||||
test_perspective_SOURCES = test-perspective.c
|
51
tests/test-perspective.c
Normal file
51
tests/test-perspective.c
Normal file
@ -0,0 +1,51 @@
|
||||
#include <clutter/clutter.h>
|
||||
|
||||
int
|
||||
main (int argc, char *argv[])
|
||||
{
|
||||
ClutterActor *rect;
|
||||
ClutterActor *stage;
|
||||
ClutterColor red = {0xff, 0, 0, 0xff}, white = {0xff, 0xff, 0xff, 0xff};
|
||||
|
||||
clutter_init (&argc, &argv);
|
||||
|
||||
stage = clutter_stage_get_default ();
|
||||
g_object_set (stage, "fullscreen", TRUE, NULL);
|
||||
|
||||
clutter_stage_set_color (CLUTTER_STAGE (stage), &red);
|
||||
|
||||
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);
|
||||
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);
|
||||
clutter_actor_set_position (rect, 0, clutter_actor_get_width(stage)-3);
|
||||
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, clutter_actor_get_height(stage)-3, 0);
|
||||
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,
|
||||
clutter_actor_get_height(stage)-3,
|
||||
clutter_actor_get_width(stage)-3);
|
||||
clutter_group_add (CLUTTER_GROUP (stage), rect);
|
||||
|
||||
clutter_actor_show_all (CLUTTER_ACTOR (stage));
|
||||
|
||||
clutter_main ();
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Reference in New Issue
Block a user