summaryrefslogtreecommitdiff
path: root/src/gtkext/graph/dot.c
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2013-03-19 21:13:51 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2013-03-19 21:13:51 (GMT)
commitcf97db0ea4d1ea983db38df85984034b49fa4f77 (patch)
treeb6d69945b24ec8da93f0bef7ccf4dfdbe1d920a2 /src/gtkext/graph/dot.c
parente7a85861ba8bcd00ceb7bf9e47f4eadccd48ce3f (diff)
Defined the first steps towards new graph renderings.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@345 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'src/gtkext/graph/dot.c')
-rw-r--r--src/gtkext/graph/dot.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/gtkext/graph/dot.c b/src/gtkext/graph/dot.c
index 18c4800..e7bbf84 100644
--- a/src/gtkext/graph/dot.c
+++ b/src/gtkext/graph/dot.c
@@ -69,7 +69,7 @@ graph_layout *create_graph_layout(char *cmds)
- //printf("CMDS =======\n%s\n\n=================\n", cmds);
+ printf("CMDS =======\n%s\n\n=================\n", cmds);
ret = gvLayout(result->context, result->graph, "dot");
if (ret != 0) goto cdl_error;
@@ -161,7 +161,12 @@ void place_nodes_of_graph_layout(const graph_layout *layout, GtkGraphView *view,
for (iter = agfstnode(layout->graph); iter != NULL; iter = agnxtnode(layout->graph, iter))
{
node = find_graph_node_by_name(nodes, count, iter->name);
- g_graph_node_place(node, view, iter->u.coord.x, height - iter->u.coord.y);
+
+ /* S'il s'agit d'un noeud artificiel créé pour dot uniquement... */
+ if (node == NULL) continue;
+
+ g_graph_node_place_old(node, view, iter->u.coord.x, height - iter->u.coord.y);
+
}
}
@@ -233,6 +238,9 @@ GtkLinkRenderer **create_links_from_graph_layout(const graph_layout *layout, siz
node = find_graph_node_by_name(nodes, ncount, agtail(eiter)->name);
+ /* S'il s'agit d'un noeud artificiel créé pour dot uniquement... */
+ if (node == NULL) continue;
+
g_graph_node_connect(node,
lines->list[0].list[0].x,
height - lines->list[0].list[0].y,