Hello,
I'm having a problem with cogl_fill_path under MacOS (see attached
code). Under MacOS, it gives
me a white rectangle with a red triangle outline instead of a white
triangle with a red outline...
I'm pretty sure this code was working few weeks ago, I'm working with
the trunk of the svn and not
the last release, something broken?
Any idea ?
Thanks.
Rno
--
"Given enough eyeballs, all bugs are shallow"
Eric Steven Raymond
// compile with:
// gcc -o test-path test-path.c `pkg-config --cflags --libs clutter-0.8`
#include <clutter/clutter.h>
static void
on_paint (ClutterActor *actor, void* param)
{
static ClutterColor color_white = { 0xff, 0xff, 0xff, 0xff };
static ClutterColor color_red = { 0xff, 0x00, 0x00, 0xff };
cogl_path_move_to(CLUTTER_INT_TO_FIXED(100), CLUTTER_INT_TO_FIXED(100));
cogl_path_line_to(CLUTTER_INT_TO_FIXED(300), CLUTTER_INT_TO_FIXED(100));
cogl_path_line_to(CLUTTER_INT_TO_FIXED(200), CLUTTER_INT_TO_FIXED(300));
cogl_path_close();
cogl_color(&color_white);
cogl_path_fill();
cogl_color(&color_red);
cogl_path_stroke();
}
int
main (int argc, char **argv)
{
ClutterActor *stage;
static ClutterColor color_black = { 0x00, 0x00, 0x00, 0xff };
clutter_init (&argc, &argv);
stage = clutter_stage_get_default();
clutter_stage_set_color(CLUTTER_STAGE (stage), &color_black);
g_signal_connect_after(stage, "paint", G_CALLBACK(on_paint), NULL);
clutter_actor_show(stage);
clutter_actor_queue_redraw(stage);
clutter_main();
return (0);
}