From: erg Date: Wed, 20 Apr 2011 19:40:23 +0000 (+0000) Subject: Add built-in scale factor so that modest sizes (especially the default 1) yield reaso... X-Git-Tag: LAST_LIBGRAPH~32^2~801 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6c9addd6bbd6c615378b99f508c0b5878264dd44;p=graphviz Add built-in scale factor so that modest sizes (especially the default 1) yield reasonable sized drawings --- diff --git a/lib/patchwork/patchwork.c b/lib/patchwork/patchwork.c index ebcd0572b..bc40f9643 100644 --- a/lib/patchwork/patchwork.c +++ b/lib/patchwork/patchwork.c @@ -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;