3 #include <glib/gprintf.h>
12 GeglNode
*gegl
; /* the gegl graph we're using as a node factor */
23 g_print ("\nUsage: %s <GeglBuffer>\n"
25 "Continously writes a timestamp to 0,0 in the buffer\n", argv
[0]);
29 gegl_init (&argc
, &argv
); /* initialize the GEGL library */
31 gegl
= gegl_node_new ();
34 buffer
= gegl_buffer_open (argv
[1]);
36 blank
= gegl_node_new_child (gegl
,
37 "operation", "gegl:color",
38 "value", gegl_color_new ("rgba(0.0,0.0,0.0,0.4)"),
41 crop
= gegl_node_new_child (gegl
,
42 "operation", "gegl:crop",
49 layer
= gegl_node_new_child (gegl
,
50 "operation", "gegl:layer",
53 shift
= gegl_node_new_child (gegl
,
54 "operation", "gegl:translate",
59 text
= gegl_node_new_child (gegl
,
60 "operation", "gegl:text",
62 "color", gegl_color_new ("rgb(1.0,1.0,1.0)"),
64 display
= gegl_node_new_child (gegl
,
65 "operation", "gegl:write-buffer",
69 gegl_node_link_many (blank
, crop
, layer
, shift
, display
, NULL
);
70 gegl_node_connect (text
, "output", layer
, "aux");
72 /* request that the save node is processed, all dependencies will
73 * be processed as well
79 for (frame
=0; frame
<frames
; frame
++)
83 gettimeofday(&tv
, NULL
);
84 gegl_node_set (text
, "string", ctime((void*)&tv
), NULL
);
85 gegl_node_process (display
);
89 /* free resources globally used by GEGL */