Graphviz 13.0.0~dev.20241220.2304
|
#include <stdio.h>
#include <stdlib.h>
#include <patchwork/patchwork.h>
#include <patchwork/tree_map.h>
#include <common/render.h>
#include <util/alloc.h>
Go to the source code of this file.
Data Structures | |
struct | treenode_t |
Macros | |
#define | DFLT_SZ 1.0 |
#define | SCALE 1000.0 /* scale up so that 1 is a reasonable default size */ |
#define | INSERT(cp) if(!first) first=cp; if(prev) prev->rightsib=cp; prev=cp; |
Typedefs | |
typedef struct treenode_t | treenode_t |
Functions | |
static double | fullArea (treenode_t *p, attrsym_t *mp) |
static double | getArea (void *obj, attrsym_t *ap) |
static treenode_t * | mkTreeNode (Agnode_t *n, attrsym_t *ap) |
static treenode_t * | mkTree (Agraph_t *g, attrsym_t *gp, attrsym_t *ap, attrsym_t *mp) |
static int | nodecmp (const void *x, const void *y) |
static void | layoutTree (treenode_t *tree) |
static void | finishNode (node_t *n) |
static void | walkTree (treenode_t *tree) |
static void | freeTree (treenode_t *tp) |
void | patchworkLayout (Agraph_t *g) |
#define DFLT_SZ 1.0 |
Definition at line 32 of file patchwork.c.
Definition at line 81 of file patchwork.c.
#define SCALE 1000.0 /* scale up so that 1 is a reasonable default size */ |
Definition at line 33 of file patchwork.c.
typedef struct treenode_t treenode_t |
Definition at line 18 of file patchwork.c.
|
static |
Definition at line 203 of file patchwork.c.
References agxget(), agxset(), common_init_node(), N_fontsize, ND_ht, and str.
Referenced by walkTree().
|
static |
Definition at line 257 of file patchwork.c.
References free(), freeTree(), treenode_t::leftchild, treenode_t::n_children, and treenode_t::rightsib.
Referenced by freeTree(), and patchworkLayout().
|
static |
Definition at line 53 of file patchwork.c.
References treenode_t::child_area, late_double(), treenode_t::subg, and treenode_t::u.
Referenced by mkTree().
|
static |
Definition at line 60 of file patchwork.c.
References DFLT_SZ, late_double(), and SCALE.
Referenced by mkTree(), and mkTreeNode().
|
static |
Definition at line 145 of file patchwork.c.
References AGRAPH, treenode_t::area, delta, disc, free(), gv_calloc(), treenode_t::kind, layoutTree(), treenode_t::leftchild, treenode_t::n_children, nodecmp(), treenode_t::r, treenode_t::rightsib, dtdisc_s_::size, rectangle::size, tree, tree_map(), Verbose, and rectangle::x.
Referenced by layoutTree(), and patchworkLayout().
|
static |
Definition at line 87 of file patchwork.c.
References agfstnode(), agnxtnode(), AGRAPH, treenode_t::area, treenode_t::child_area, fullArea(), GD_clust, GD_n_cluster, getArea(), gv_alloc(), INSERT, treenode_t::kind, treenode_t::leftchild, mkTree(), mkTreeNode(), treenode_t::n_children, prev, SPARENT, treenode_t::subg, and treenode_t::u.
Referenced by mkTree(), and patchworkLayout().
|
static |
Definition at line 70 of file patchwork.c.
References AGNODE, treenode_t::area, getArea(), gv_alloc(), treenode_t::kind, treenode_t::n, and treenode_t::u.
Referenced by mkTree().
|
static |
Definition at line 133 of file patchwork.c.
Referenced by layoutTree().
void patchworkLayout | ( | Agraph_t * | g | ) |
Definition at line 273 of file patchwork.c.
References agfindgraphattr, agfindnodeattr, treenode_t::area, freeTree(), layoutTree(), mkTree(), treenode_t::r, and walkTree().
Referenced by patchwork_layout().
|
static |
Definition at line 216 of file patchwork.c.
References agnameof(), AGRAPH, agraphof(), center(), finishNode(), GD_bb, GD_flip, gv_nodesize(), treenode_t::leftchild, boxf::LL, ND_coord, ND_height, ND_ht, ND_width, ND_xsize, PS2INCH, treenode_t::rightsib, rectangle::size, tree, boxf::UR, Verbose, walkTree(), point::x, pointf_s::x, rectangle::x, point::y, and pointf_s::y.
Referenced by patchworkLayout(), and walkTree().