From 1cb0bfdc11dc46a2bc2fd6dfb0aa32d0f4bf0fe1 Mon Sep 17 00:00:00 2001
From: Cyrille Bagard <nocbos@gmail.com>
Date: Sun, 28 Jun 2009 22:46:26 +0000
Subject: Improved Graphviz coordinates.

git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@83 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
---
 ChangeLog        | 6 ++++++
 src/graph/dot.c  | 6 ++++--
 src/graph/node.c | 6 +++---
 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");
-- 
cgit v0.11.2-87-g4458