]> granicus.if.org Git - graphviz/commitdiff
Add built-in scale factor so that modest sizes (especially the default 1) yield reaso...
authorerg <devnull@localhost>
Wed, 20 Apr 2011 19:40:23 +0000 (19:40 +0000)
committererg <devnull@localhost>
Wed, 20 Apr 2011 19:40:23 +0000 (19:40 +0000)
lib/patchwork/patchwork.c

index ebcd0572b531b02b847c19ac4c6ce085fcf9c1b0..bc40f96437d0c497bcf2dae1d06d2e7007a48a59 100644 (file)
@@ -30,14 +30,18 @@ struct treenode_t {
     int n_children;
 };
 
+#define DFTL_SZ 1.0
+#define SCALE 1000.0      /* scale up so that 1 is a reasonable default size */
+
 /* mkTreeNode:
  */
 static treenode_t* mkTreeNode (Agnode_t* n, attrsym_t* ap)
 {
     treenode_t *p = NEW(treenode_t);
 
-    p->area = late_double (n, ap, 1.0, 0);
-    if (p->area == 0) p->area = 1.0;
+    p->area = late_double (n, ap, DFTL_SZ, 0);
+    if (p->area == 0) p->area = DFTL_SZ;
+    p->area *= SCALE;
     p->kind = AGNODE;
     p->u.n = n;