Graphviz 13.0.0~dev.20241220.2304
Loading...
Searching...
No Matches
dotinit.c File Reference
#include <assert.h>
#include <limits.h>
#include <time.h>
#include <dotgen/dot.h>
#include <pack/pack.h>
#include <dotgen/aspect.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include <util/agxbuf.h>
#include <util/alloc.h>
#include <util/streq.h>
Include dependency graph for dotinit.c:

Go to the source code of this file.

Macros

#define agnodeattr(g, n, v)   agattr(g,AGNODE,n,v)
 

Functions

static void dot_init_subg (graph_t *g, graph_t *droot)
 
static void dot_init_node (node_t *n)
 
static void dot_init_edge (edge_t *e)
 
void dot_init_node_edge (graph_t *g)
 
static void dot_cleanup_node (node_t *n)
 
static void free_virtual_edge_list (node_t *n)
 
static void free_virtual_node_list (node_t *vn)
 
static void dot_cleanup_graph (graph_t *g)
 
void dot_cleanup (graph_t *g)
 
static void remove_from_rank (Agraph_t *g, Agnode_t *n)
 
static void removeFill (Agraph_t *g)
 
static void attach_phase_attrs (Agraph_t *g, int maxphase)
 
static void dotLayout (Agraph_t *g)
 
static void initSubg (Agraph_t *sg, Agraph_t *g)
 
static void attachPos (Agraph_t *g)
 
static void resetCoord (Agraph_t *g)
 
static void copyCluster (Agraph_t *scl, Agraph_t *cl)
 
static void copyClusterInfo (size_t ncc, Agraph_t **ccs, Agraph_t *root)
 
static void doDot (Agraph_t *g)
 
void dot_layout (Agraph_t *g)
 
Agraph_tdot_root (void *p)
 

Macro Definition Documentation

◆ agnodeattr

#define agnodeattr (   g,
  n,
 
)    agattr(g,AGNODE,n,v)

Definition at line 272 of file dotinit.c.

Function Documentation

◆ attach_phase_attrs()

static void attach_phase_attrs ( Agraph_t g,
int  maxphase 
)
static

Definition at line 275 of file dotinit.c.

References agfstnode(), agnodeattr, agnxtnode(), agxbfree(), agxbprint(), agxbuse(), agxset(), ND_order, and ND_rank.

Referenced by dotLayout().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ attachPos()

static void attachPos ( Agraph_t g)
static

Definition at line 348 of file dotinit.c.

References agfstnode(), agnnodes(), agnxtnode(), gv_calloc(), ND_coord, ND_pos, ps, and PS2INCH.

Referenced by doDot().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ copyCluster()

static void copyCluster ( Agraph_t scl,
Agraph_t cl 
)
static

Definition at line 382 of file dotinit.c.

References agbindrec(), cg(), copyCluster(), GD_bb, GD_border, GD_clust, GD_label, GD_label_pos, GD_n_cluster, gv_calloc(), mapClust(), and NULL.

Referenced by copyCluster(), and copyClusterInfo().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ copyClusterInfo()

static void copyClusterInfo ( size_t  ncc,
Agraph_t **  ccs,
Agraph_t root 
)
static

Definition at line 407 of file dotinit.c.

References cg(), copyCluster(), GD_clust, GD_n_cluster, gv_calloc(), and mapClust().

Referenced by doDot().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ doDot()

static void doDot ( Agraph_t g)
static

Definition at line 431 of file dotinit.c.

References agdelete(), attachPos(), cccomps(), CL_OFFSET, copyClusterInfo(), pack_info::doSplines, dot_cleanup_graph(), dotLayout(), pack_info::fixed, free(), GD_drawing, getPack(), getPackInfo(), getPackModeInfo(), initSubg(), l_graph, l_node, l_undef, pack_info::margin, pack_info::mode, NULL, Pack, packSubgraphs(), R_NONE, and resetCoord().

Referenced by dot_layout().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dot_cleanup()

void dot_cleanup ( graph_t g)

Definition at line 177 of file dotinit.c.

References agfstnode(), agfstout(), agnxtnode(), agnxtout(), dot_cleanup_graph(), dot_cleanup_node(), free_virtual_node_list(), GD_nlist, and gv_cleanup_edge().

Referenced by cleanupCloneGraph().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dot_cleanup_graph()

static void dot_cleanup_graph ( graph_t g)
static

Definition at line 149 of file dotinit.c.

References agbindrec(), agfstsubg(), agnxtsubg(), agroot(), dot_cleanup_graph(), free(), free_label(), free_list, GD_clust, GD_comp, GD_drawing, GD_label, GD_maxrank, GD_minrank, GD_rank, GD_rankleader, and NULL.

Referenced by doDot(), dot_cleanup(), and dot_cleanup_graph().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dot_cleanup_node()

static void dot_cleanup_node ( node_t n)
static

Definition at line 99 of file dotinit.c.

References agdelrec(), free_label(), free_list, ND_flat_in, ND_flat_out, ND_in, ND_label, ND_other, ND_out, ND_shape, and ND_xlabel.

Referenced by dot_cleanup(), and removeFill().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dot_init_edge()

static void dot_init_edge ( edge_t e)
static

Definition at line 55 of file dotinit.c.

References agbindrec(), aghead, agtail, CL_CROSS, common_init_edge(), E_minlen, E_showboxes, E_weight, ED_count, ED_minlen, ED_showboxes, ED_weight, ED_xpenalty, late_int(), late_string(), N_group, and nonconstraint_edge().

Referenced by dot_init_node_edge().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dot_init_node()

static void dot_init_node ( node_t n)
static

Definition at line 41 of file dotinit.c.

References agbindrec(), agraphof(), alloc_elist, common_init_node(), GD_flip, gv_nodesize(), ND_flat_in, ND_flat_out, ND_in, ND_other, ND_out, and ND_UF_size.

Referenced by dot_init_node_edge().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dot_init_node_edge()

void dot_init_node_edge ( graph_t g)

Definition at line 85 of file dotinit.c.

References agfstnode(), agfstout(), agnxtnode(), agnxtout(), dot_init_edge(), and dot_init_node().

Referenced by dotLayout(), and make_flat_adj_edges().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dot_init_subg()

static void dot_init_subg ( graph_t g,
graph_t droot 
)
static

Definition at line 25 of file dotinit.c.

References agbindrec(), agfstsubg(), agnxtsubg(), agroot(), dot_init_subg(), and GD_dotroot.

Referenced by dot_init_subg(), and dotLayout().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dot_layout()

void dot_layout ( Agraph_t g)

Definition at line 490 of file dotinit.c.

References agnnodes(), doDot(), and dotneato_postprocess().

Here is the call graph for this function:

◆ dot_root()

Agraph_t * dot_root ( void *  p)

Definition at line 496 of file dotinit.c.

References agroot(), and GD_dotroot.

Referenced by adjustRanks(), adjustSimple(), build_ranks(), checkFlatAdjacent(), class2(), clust_ht(), contain_clustnodes(), dot_compute_bb(), expand_ranksets(), find_clusters(), flat_edge(), flat_node(), flat_search(), init_mincross(), interclexp(), keepout_othernodes(), make_lrvn(), map_path(), merge_ranks(), mincross(), node_induce(), realFillRanks(), rebuild_vlists(), rec_reset_vlists(), and remove_rankleaders().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dotLayout()

static void dotLayout ( Agraph_t g)
static

Definition at line 295 of file dotinit.c.

References agfindgraphattr, agget(), attach_phase_attrs(), dot_compoundEdges(), dot_init_node_edge(), dot_init_subg(), dot_mincross(), dot_position(), dot_rank(), dot_sameports(), dot_splines(), EDGETYPE_SPLINE, GD_flags, late_int(), mapbool(), NEW_RANK, removeFill(), setAspect(), and setEdgeType().

Referenced by doDot().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ free_virtual_edge_list()

static void free_virtual_edge_list ( node_t n)
static

Definition at line 113 of file dotinit.c.

References Agedge_s::base, Agobj_s::data, delete_fast_edge(), free(), ND_in, ND_out, and SIZE_MAX.

Referenced by free_virtual_node_list().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ free_virtual_node_list()

static void free_virtual_node_list ( node_t vn)
static

Definition at line 131 of file dotinit.c.

References Agnode_s::base, Agobj_s::data, free(), free_list, free_virtual_edge_list(), ND_in, ND_next, ND_node_type, ND_out, and VIRTUAL.

Referenced by dot_cleanup().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ initSubg()

static void initSubg ( Agraph_t sg,
Agraph_t g 
)
static

Definition at line 329 of file dotinit.c.

References agbindrec(), GD_charset, GD_drawing, GD_fontnames, GD_gvc, GD_nodesep, GD_rankdir2, GD_ranksep, and gv_alloc().

Referenced by doDot().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ remove_from_rank()

static void remove_from_rank ( Agraph_t g,
Agnode_t n 
)
static

Definition at line 230 of file dotinit.c.

References GD_rank, ND_rank, and NULL.

Referenced by removeFill().

Here is the caller graph for this function:

◆ removeFill()

static void removeFill ( Agraph_t g)
static

Definition at line 254 of file dotinit.c.

References agdelnode(), agdelsubg(), agfstnode(), agnxtnode(), agsubg(), delete_fast_node(), dot_cleanup_node(), and remove_from_rank().

Referenced by dotLayout().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ resetCoord()

static void resetCoord ( Agraph_t g)
static

Definition at line 366 of file dotinit.c.

References agfstnode(), agnxtnode(), free(), INCH2PS, ND_coord, ND_pos, and ps.

Referenced by doDot().

Here is the call graph for this function:
Here is the caller graph for this function: