summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--src/graph/dot.c6
-rw-r--r--src/graph/node.c6
3 files changed, 13 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 6678b02..e60b797 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
09-06-29 Cyrille Bagard <nocbos@gmail.com>
+ * src/graph/dot.c:
+ * src/graph/node.c:
+ Improve Graphviz coordinates (not yet perfect).
+
+09-06-29 Cyrille Bagard <nocbos@gmail.com>
+
* src/gtkext/gtkbinview.c:
* src/gtkext/gtkbinview.h:
* src/gtkext/gtkbinview-int.h:
diff --git a/src/graph/dot.c b/src/graph/dot.c
index e4ee38c..9f8e3b3 100644
--- a/src/graph/dot.c
+++ b/src/graph/dot.c
@@ -199,7 +199,7 @@ GtkLinkRenderer **create_links_from_graph_layout(const graph_layout *layout, siz
{
lines = ED_spl(eiter);
- printf("edge == %p\n", eiter);
+ //printf("edge == %p\n", eiter);
points = NULL;
points_count = 0;
@@ -213,14 +213,16 @@ GtkLinkRenderer **create_links_from_graph_layout(const graph_layout *layout, siz
points[points_count + k].x = lines->list[i].list[k].x;
points[points_count + k].y = height - lines->list[i].list[k].y;
+ /*
printf(" ... ( %d ; %d)\n",
lines->list[i].list[k].x, height - lines->list[i].list[k].y);
+ */
}
points_count += lines->list[i].size;
- printf(" ...\n");
+ //printf(" ...\n");
}
diff --git a/src/graph/node.c b/src/graph/node.c
index 8432476..e6427d8 100644
--- a/src/graph/node.c
+++ b/src/graph/node.c
@@ -177,7 +177,7 @@ GGraphNode *g_graph_node_new(GtkBinView *view)
}
-#include <math.h>
+
/******************************************************************************
* *
* Paramètres : node = intermédiaire à consulter. *
@@ -208,10 +208,10 @@ char *g_graph_node_register_for_dot(const GGraphNode *node, char *cmds)
requisition.width / G_GRAPH_NODE_GET_CLASS(node)->dpi_x,
requisition.height / G_GRAPH_NODE_GET_CLASS(node)->dpi_y);
- snprintf(buffer, 128, ", width=\"%g\"", round(requisition.width / G_GRAPH_NODE_GET_CLASS(node)->dpi_x) + 1.0);
+ snprintf(buffer, 128, ", width=\"%g\"", requisition.width / G_GRAPH_NODE_GET_CLASS(node)->dpi_x);
cmds = stradd(cmds, buffer);
- snprintf(buffer, 128, ", height=\"%g\"", round(requisition.height / G_GRAPH_NODE_GET_CLASS(node)->dpi_y) + 1.0);
+ snprintf(buffer, 128, ", height=\"%g\"", requisition.height / G_GRAPH_NODE_GET_CLASS(node)->dpi_y);
cmds = stradd(cmds, buffer);
cmds = stradd(cmds, "];\n");