test-recorder: Explicitly make the clutter API coordinates doubles
That's what clutter expects and it would crash otherwise. https://bugzilla.gnome.org/show_bug.cgi?id=675301
This commit is contained in:
parent
a5ac183d86
commit
cb5941ec55
@ -48,8 +48,8 @@ int main (int argc, char **argv)
|
|||||||
animation = clutter_actor_animate (text,
|
animation = clutter_actor_animate (text,
|
||||||
CLUTTER_EASE_IN_OUT_QUAD,
|
CLUTTER_EASE_IN_OUT_QUAD,
|
||||||
3000,
|
3000,
|
||||||
"x", 320,
|
"x", 320.0,
|
||||||
"y", 240,
|
"y", 240.0,
|
||||||
NULL);
|
NULL);
|
||||||
g_signal_connect (animation, "completed",
|
g_signal_connect (animation, "completed",
|
||||||
G_CALLBACK (on_animation_completed), NULL);
|
G_CALLBACK (on_animation_completed), NULL);
|
||||||
@ -58,32 +58,32 @@ int main (int argc, char **argv)
|
|||||||
"text", "Blue",
|
"text", "Blue",
|
||||||
"font-name", "Sans 40px",
|
"font-name", "Sans 40px",
|
||||||
"color", &blue,
|
"color", &blue,
|
||||||
"x", 640,
|
"x", 640.0,
|
||||||
"y", 0,
|
"y", 0.0,
|
||||||
NULL);
|
NULL);
|
||||||
clutter_actor_set_anchor_point_from_gravity (text, CLUTTER_GRAVITY_NORTH_EAST);
|
clutter_actor_set_anchor_point_from_gravity (text, CLUTTER_GRAVITY_NORTH_EAST);
|
||||||
clutter_actor_add_child (stage, text);
|
clutter_actor_add_child (stage, text);
|
||||||
animation = clutter_actor_animate (text,
|
animation = clutter_actor_animate (text,
|
||||||
CLUTTER_EASE_IN_OUT_QUAD,
|
CLUTTER_EASE_IN_OUT_QUAD,
|
||||||
3000,
|
3000,
|
||||||
"x", 320,
|
"x", 320.0,
|
||||||
"y", 240,
|
"y", 240.0,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
text = g_object_new (CLUTTER_TYPE_TEXT,
|
text = g_object_new (CLUTTER_TYPE_TEXT,
|
||||||
"text", "Green",
|
"text", "Green",
|
||||||
"font-name", "Sans 40px",
|
"font-name", "Sans 40px",
|
||||||
"color", &green,
|
"color", &green,
|
||||||
"x", 0,
|
"x", 0.0,
|
||||||
"y", 480,
|
"y", 480.0,
|
||||||
NULL);
|
NULL);
|
||||||
clutter_actor_set_anchor_point_from_gravity (text, CLUTTER_GRAVITY_SOUTH_WEST);
|
clutter_actor_set_anchor_point_from_gravity (text, CLUTTER_GRAVITY_SOUTH_WEST);
|
||||||
clutter_actor_add_child (stage, text);
|
clutter_actor_add_child (stage, text);
|
||||||
animation = clutter_actor_animate (text,
|
animation = clutter_actor_animate (text,
|
||||||
CLUTTER_EASE_IN_OUT_QUAD,
|
CLUTTER_EASE_IN_OUT_QUAD,
|
||||||
3000,
|
3000,
|
||||||
"x", 320,
|
"x", 320.0,
|
||||||
"y", 240,
|
"y", 240.0,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
recorder = shell_recorder_new (CLUTTER_STAGE (stage));
|
recorder = shell_recorder_new (CLUTTER_STAGE (stage));
|
||||||
|
Loading…
Reference in New Issue
Block a user