gegl r2949 - in trunk: . gegl
- From: martinn svn gnome org
- To: svn-commits-list gnome org
- Subject: gegl r2949 - in trunk: . gegl
- Date: Sat, 28 Feb 2009 12:44:10 +0000 (UTC)
Author: martinn
Date: Sat Feb 28 12:44:10 2009
New Revision: 2949
URL: http://svn.gnome.org/viewvc/gegl?rev=2949&view=rev
Log:
Improve formating of graphviz nodes
Modified:
trunk/ChangeLog
trunk/gegl/gegl-dot.c
Modified: trunk/gegl/gegl-dot.c
==============================================================================
--- trunk/gegl/gegl-dot.c (original)
+++ trunk/gegl/gegl-dot.c Sat Feb 28 12:44:10 2009
@@ -36,12 +36,17 @@
{
g_string_append_printf (string, "op_%p [label=\"", node);
- g_string_append_printf (string, "{{");
+ /* We build the record from top to bottom */
+ g_string_append_printf (string, "{");
+ /* The first row is a list of output pads */
{
GSList *pads = gegl_node_get_pads (node);
GSList *entry = pads;
gboolean got_output = FALSE;
+
+ g_string_append_printf (string, "{");
+
while (entry)
{
GeglPad *pad = entry->data;
@@ -58,10 +63,14 @@
}
entry = g_slist_next (entry);
}
+
+ g_string_append_printf (string, "}|");
}
- g_string_append_printf (string, "}|{%s|{", gegl_node_get_debug_name (node));
+ /* The second row is the operation name such as gegl:translate */
+ g_string_append_printf (string, "%s|", gegl_node_get_debug_name (node));
+ /* The next rows are property names and their values */
if (1)
{
guint n_properties;
@@ -92,7 +101,7 @@
}
if (sval)
{
- g_string_append_printf (string, "%s=%s\\n", name, sval);
+ g_string_append_printf (string, "%s=%s | ", name, sval);
g_free (sval);
}
g_value_unset (&svalue);
@@ -102,12 +111,14 @@
g_free (properties);
}
- g_string_append_printf (string, "}}|{");
-
+ /* The last row is input pads */
{
GSList *pads = gegl_node_get_pads (node);
GSList *entry = pads;
gboolean got_input = FALSE;
+
+ g_string_append_printf (string, "{");
+
while (entry)
{
GeglPad *pad = entry->data;
@@ -124,9 +135,12 @@
}
entry = g_slist_next (entry);
}
+
+ g_string_append_printf (string, "}");
}
- g_string_append_printf (string, "}}\"\n shape=\"record\"];\n");
+ g_string_append_printf (string, "}\"");
+ g_string_append_printf (string, "shape=\"record\"];\n");
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]