Graphviz  2.41.20170921.2350
types.h
Go to the documentation of this file.
1 /* $Id$ $Revision$ */
2 /* vim:set shiftwidth=4 ts=8: */
3 
4 /*************************************************************************
5  * Copyright (c) 2011 AT&T Intellectual Property
6  * All rights reserved. This program and the accompanying materials
7  * are made available under the terms of the Eclipse Public License v1.0
8  * which accompanies this distribution, and is available at
9  * http://www.eclipse.org/legal/epl-v10.html
10  *
11  * Contributors: See CVS logs. Details at http://www.graphviz.org/
12  *************************************************************************/
13 
14 #ifndef GV_TYPES_H
15 #define GV_TYPES_H
16 
17 /* Define if you want CGRAPH */
18 #define WITH_CGRAPH 1
19 
20 #include <stdio.h>
21 #include <assert.h>
22 #include <signal.h>
23 
24 typedef unsigned char boolean;
25 #ifndef NOT
26 #define NOT(v) (!(v))
27 #endif
28 #ifndef FALSE
29 #define FALSE 0
30 #endif
31 #ifndef TRUE
32 #define TRUE NOT(FALSE)
33 #endif
34 
35 #include "geom.h"
36 #include "gvcext.h"
37 #include "pathgeom.h"
38 #include "textspan.h"
39 #include "cgraph.h"
40 
41 #ifdef __cplusplus
42 extern "C" {
43 #endif
44 
45  typedef int (*qsort_cmpf) (const void *, const void *);
46  typedef int (*bsearch_cmpf) (const void *, const void *);
47  typedef struct Agraph_s graph_t;
48  typedef struct Agnode_s node_t;
49  typedef struct Agedge_s edge_t;
50  typedef struct Agsym_s attrsym_t;
51 #define TAIL_ID "tailport"
52 #define HEAD_ID "headport"
53 
54  typedef struct htmllabel_t htmllabel_t;
55 
56  typedef union inside_t {
57  struct {
59  double* r;
60  } a;
61  struct {
63  boxf* bp;
64  } s;
65  } inside_t;
66 
67  typedef struct port { /* internal edge endpoint specification */
68  pointf p; /* aiming point relative to node center */
69  double theta; /* slope in radians */
70  boxf *bp; /* if not null, points to bbox of
71  * rectangular area that is port target
72  */
73  boolean defined; /* if true, edge has port info at this end */
74  boolean constrained; /* if true, constraints such as theta are set */
75  boolean clip; /* if true, clip end to node/port shape */
76  boolean dyna; /* if true, assign compass point dynamically */
77  unsigned char order; /* for mincross */
78  unsigned char side; /* if port is on perimeter of node, this
79  * contains the bitwise OR of the sides (TOP,
80  * BOTTOM, etc.) it is on.
81  */
82  char *name; /* port name, if it was explicitly given, otherwise NULL */
83  } port;
84 
85  typedef struct {
86  boolean(*swapEnds) (edge_t * e); /* Should head and tail be swapped? */
87  boolean(*splineMerge) (node_t * n); /* Is n a node in the middle of an edge? */
88  boolean ignoreSwap; /* Test for swapped edges if false */
89  boolean isOrtho; /* Orthogonal routing used */
90  } splineInfo;
91 
92  typedef struct pathend_t {
93  boxf nb; /* the node box */
94  pointf np; /* node port */
95  int sidemask;
96  int boxn;
97  boxf boxes[20];
98  } pathend_t;
99 
100  typedef struct path { /* internal specification for an edge spline */
103  int nbox; /* number of subdivisions */
104  boxf *boxes; /* rectangular regions of subdivision */
105  void *data;
106  } path;
107 
108  typedef struct bezier {
110  int size;
111  int sflag;
112  int eflag;
115  } bezier;
116 
117  typedef struct splines {
119  int size;
121  } splines;
122 
123  typedef struct textlabel_t {
124  char *text;
125  char *fontname;
126  char *fontcolor;
127  int charset;
128  double fontsize;
129  pointf dimen; /* the diagonal size of the label (estimated by layout) */
130  pointf space; /* the diagonal size of the space for the label */
131  /* the rendered label is aligned in this box */
132  /* space does not include pad or margin */
133  pointf pos; /* the center of the space for the label */
134  union {
135  struct {
137  short nspans;
138  } txt;
140  } u;
141  char valign; /* 't' 'c' 'b' */
142  boolean set; /* true if position is set */
143  boolean html; /* true if html label */
144  } textlabel_t;
145 
146  typedef struct polygon_t { /* mutable shape information for a node */
147  int regular; /* true for symmetric shapes */
148  int peripheries; /* number of periphery lines */
149  int sides; /* number of sides */
150  double orientation; /* orientation of shape (+ve degrees) */
151  double distortion; /* distortion factor - as in trapezium */
152  double skew; /* skew factor - as in parallelogram */
153  int option; /* ROUNDED, DIAGONAL corners, etc. */
154  pointf *vertices; /* array of vertex points */
155  } polygon_t;
156 
157  typedef struct stroke_t { /* information about a single stroke */
158  /* we would have called it a path if that term wasn't already used */
159  int nvertices; /* number of points in the stroke */
160  int flags; /* stroke style flags */
161  pointf *vertices; /* array of vertex points */
162  } stroke_t;
163 
164 /* flag definitions for stroke_t */
165 #define STROKE_CLOSED (1 << 0)
166 #define STROKE_FILLED (1 << 1)
167 #define STROKE_PENDOWN (1 << 2)
168 #define STROKE_VERTICES_ALLOCATED (1 << 3)
169 
170  typedef struct shape_t { /* mutable shape information for a node */
171  int nstrokes; /* number of strokes in array */
172  stroke_t *strokes; /* array of strokes */
173  /* The last stroke must always be closed, but can be pen_up.
174  * It is used as the clipping path */
175  } shape_t;
176 
177  typedef struct shape_functions { /* read-only shape functions */
178  void (*initfn) (node_t *); /* initializes shape from node u.shape_info structure */
179  void (*freefn) (node_t *); /* frees shape from node u.shape_info structure */
180  port(*portfn) (node_t *, char *, char *); /* finds aiming point and slope of port */
181  boolean(*insidefn) (inside_t * inside_context, pointf); /* clips incident gvc->e spline on shape of gvc->n */
182  int (*pboxfn)(node_t* n, port* p, int side, boxf rv[], int *kptr); /* finds box path to reach port */
183  void (*codefn) (GVJ_t * job, node_t * n); /* emits graphics code for node */
184  } shape_functions;
185 
187 
188  typedef struct shape_desc { /* read-only shape descriptor */
189  char *name; /* as read from graph file */
191  polygon_t *polygon; /* base polygon info */
192  boolean usershape;
193  } shape_desc;
194 
195 #include "usershape.h" /* usershapes needed by gvc */
196 
197  typedef struct nodequeue {
202  } nodequeue;
203 
204  typedef struct adjmatrix_t {
205  int nrows;
206  int ncols;
207  char *data;
208  } adjmatrix_t;
209 
210  typedef struct rank_t {
211  int n; /* number of nodes in this rank */
212  node_t **v; /* ordered list of nodes in rank */
213  int an; /* globally allocated number of nodes */
214  node_t **av; /* allocated list of nodes in rank */
215  double ht1; /* height below/above centerline */
216  double ht2; /* height below/above centerline */
217  double pht1; /* as above, but only primitive nodes */
218  double pht2; /* as above, but only primitive nodes */
219  boolean candidate; /* for transpose () */
220  boolean valid;
221  int cache_nc; /* caches number of crossings */
223  } rank_t;
224 
225  typedef enum { R_NONE =
227 
228  typedef struct layout_t {
229  double quantum;
230  double scale;
231  double ratio; /* set only if ratio_kind == R_VALUE */
232  double dpi;
236  boolean filled;
237  boolean landscape;
238  boolean centered;
240  void* xdots;
241  char* id;
242  } layout_t;
243 
244 /* for "record" shapes */
245  typedef struct field_t {
246  pointf size; /* its dimension */
247  boxf b; /* its placement in node's coordinates */
248  int n_flds;
249  textlabel_t *lp; /* n_flds == 0 */
250  struct field_t **fld; /* n_flds > 0 */
251  char *id; /* user's identifier */
252  unsigned char LR; /* if box list is horizontal (left to right) */
253  unsigned char sides; /* sides of node exposed to field */
254  } field_t;
255 
256  typedef struct nlist_t {
258  int size;
259  } nlist_t;
260 
261  typedef struct elist {
263  int size;
264  } elist;
265 
266 #define GUI_STATE_ACTIVE (1<<0)
267 #define GUI_STATE_SELECTED (1<<1)
268 #define GUI_STATE_VISITED (1<<2)
269 #define GUI_STATE_DELETED (1<<3)
270 
271 #define elist_fastapp(item,L) do {L.list[L.size++] = item; L.list[L.size] = NULL;} while(0)
272 #define elist_append(item,L) do {L.list = ALLOC(L.size + 2,L.list,edge_t*); L.list[L.size++] = item; L.list[L.size] = NULL;} while(0)
273 #define alloc_elist(n,L) do {L.size = 0; L.list = N_NEW(n + 1,edge_t*); } while (0)
274 #define free_list(L) do {if (L.list) free(L.list);} while (0)
275 
277 
278  typedef struct Agraphinfo_t {
280  /* to generate code */
282  textlabel_t *label; /* if the cluster has a title */
283  boxf bb; /* bounding box */
284  pointf border[4]; /* sizes of margins for graph labels */
285  unsigned char gui_state; /* Graph state for GUI ops */
286  unsigned char has_labels;
287  boolean has_images;
288  unsigned char charset; /* input character set */
289  int rankdir;
290  double ht1; /* below and above extremal ranks */
291  double ht2; /* below and above extremal ranks */
292  unsigned short flags;
293  void *alg;
294  GVC_t *gvc; /* context for "globals" over multiple graphs */
295  void (*cleanup) (graph_t * g); /* function to deallocate layout-specific data */
296 
297 #ifndef DOT_ONLY
298  /* to place nodes */
300  int move;
301  double **dist;
302  double **spring;
303  double **sum_t;
304  double ***t;
305  unsigned short ndim;
306  unsigned short odim;
307 #endif
308 #ifndef NEATO_ONLY
309  /* to have subgraphs */
311  graph_t **clust; /* clusters are in clust[1..n_cluster] !!! */
315  graph_t *parent; /* containing cluster (not parent subgraph) */
316  int level; /* cluster nesting level (not node level!) */
317  node_t *minrep; /* set leaders for min and max rank */
318  node_t *maxrep; /* set leaders for min and max rank */
319 
320  /* fast graph node list */
322  /* connected components */
323  node_t *minset; /* set leaders */
324  node_t *maxset; /* set leaders */
325  long n_nodes;
326  /* includes virtual */
327  short minrank;
328  short maxrank;
329 
330  /* various flags */
331  boolean has_flat_edges;
332  boolean has_sourcerank;
333  boolean has_sinkrank;
334  unsigned char showboxes;
335  fontname_kind fontnames; /* to override mangling in SVG */
336 
337  int nodesep;
338  int ranksep;
339  node_t *ln; /* left nodes of bounding box */
340  node_t *rn; /* right nodes of bounding box */
341 
342  /* for clusters */
345  boolean expanded;
346  char installed;
347  char set_type;
348  char label_pos;
349  boolean exact_ranksep;
350 #endif
351 
352  } Agraphinfo_t;
353 
354 #define GD_parent(g) (((Agraphinfo_t*)AGDATA(g))->parent)
355 #define GD_level(g) (((Agraphinfo_t*)AGDATA(g))->level)
356 #define GD_drawing(g) (((Agraphinfo_t*)AGDATA(g))->drawing)
357 #define GD_bb(g) (((Agraphinfo_t*)AGDATA(g))->bb)
358 #define GD_gvc(g) (((Agraphinfo_t*)AGDATA(g))->gvc)
359 #define GD_cleanup(g) (((Agraphinfo_t*)AGDATA(g))->cleanup)
360 #define GD_dist(g) (((Agraphinfo_t*)AGDATA(g))->dist)
361 #define GD_alg(g) (((Agraphinfo_t*)AGDATA(g))->alg)
362 #define GD_border(g) (((Agraphinfo_t*)AGDATA(g))->border)
363 #define GD_cl_cnt(g) (((Agraphinfo_t*)AGDATA(g))->cl_nt)
364 #define GD_clust(g) (((Agraphinfo_t*)AGDATA(g))->clust)
365 #define GD_dotroot(g) (((Agraphinfo_t*)AGDATA(g))->dotroot)
366 #define GD_comp(g) (((Agraphinfo_t*)AGDATA(g))->comp)
367 #define GD_exact_ranksep(g) (((Agraphinfo_t*)AGDATA(g))->exact_ranksep)
368 #define GD_expanded(g) (((Agraphinfo_t*)AGDATA(g))->expanded)
369 #define GD_flags(g) (((Agraphinfo_t*)AGDATA(g))->flags)
370 #define GD_gui_state(g) (((Agraphinfo_t*)AGDATA(g))->gui_state)
371 #define GD_charset(g) (((Agraphinfo_t*)AGDATA(g))->charset)
372 #define GD_has_labels(g) (((Agraphinfo_t*)AGDATA(g))->has_labels)
373 #define GD_has_images(g) (((Agraphinfo_t*)AGDATA(g))->has_images)
374 #define GD_has_flat_edges(g) (((Agraphinfo_t*)AGDATA(g))->has_flat_edges)
375 #define GD_has_sourcerank(g) (((Agraphinfo_t*)AGDATA(g))->has_sourcerank)
376 #define GD_has_sinkrank(g) (((Agraphinfo_t*)AGDATA(g))->has_sinkrank)
377 #define GD_ht1(g) (((Agraphinfo_t*)AGDATA(g))->ht1)
378 #define GD_ht2(g) (((Agraphinfo_t*)AGDATA(g))->ht2)
379 #define GD_inleaf(g) (((Agraphinfo_t*)AGDATA(g))->inleaf)
380 #define GD_installed(g) (((Agraphinfo_t*)AGDATA(g))->installed)
381 #define GD_label(g) (((Agraphinfo_t*)AGDATA(g))->label)
382 #define GD_leader(g) (((Agraphinfo_t*)AGDATA(g))->leader)
383 #define GD_rankdir2(g) (((Agraphinfo_t*)AGDATA(g))->rankdir)
384 #define GD_rankdir(g) (((Agraphinfo_t*)AGDATA(g))->rankdir & 0x3)
385 #define GD_flip(g) (GD_rankdir(g) & 1)
386 #define GD_realrankdir(g) ((((Agraphinfo_t*)AGDATA(g))->rankdir) >> 2)
387 #define GD_realflip(g) (GD_realrankdir(g) & 1)
388 #define GD_ln(g) (((Agraphinfo_t*)AGDATA(g))->ln)
389 #define GD_maxrank(g) (((Agraphinfo_t*)AGDATA(g))->maxrank)
390 #define GD_maxset(g) (((Agraphinfo_t*)AGDATA(g))->maxset)
391 #define GD_minrank(g) (((Agraphinfo_t*)AGDATA(g))->minrank)
392 #define GD_minset(g) (((Agraphinfo_t*)AGDATA(g))->minset)
393 #define GD_minrep(g) (((Agraphinfo_t*)AGDATA(g))->minrep)
394 #define GD_maxrep(g) (((Agraphinfo_t*)AGDATA(g))->maxrep)
395 #define GD_move(g) (((Agraphinfo_t*)AGDATA(g))->move)
396 #define GD_n_cluster(g) (((Agraphinfo_t*)AGDATA(g))->n_cluster)
397 #define GD_n_nodes(g) (((Agraphinfo_t*)AGDATA(g))->n_nodes)
398 #define GD_ndim(g) (((Agraphinfo_t*)AGDATA(g))->ndim)
399 #define GD_odim(g) (((Agraphinfo_t*)AGDATA(g))->odim)
400 #define GD_neato_nlist(g) (((Agraphinfo_t*)AGDATA(g))->neato_nlist)
401 #define GD_nlist(g) (((Agraphinfo_t*)AGDATA(g))->nlist)
402 #define GD_nodesep(g) (((Agraphinfo_t*)AGDATA(g))->nodesep)
403 #define GD_outleaf(g) (((Agraphinfo_t*)AGDATA(g))->outleaf)
404 #define GD_rank(g) (((Agraphinfo_t*)AGDATA(g))->rank)
405 #define GD_rankleader(g) (((Agraphinfo_t*)AGDATA(g))->rankleader)
406 #define GD_ranksep(g) (((Agraphinfo_t*)AGDATA(g))->ranksep)
407 #define GD_rn(g) (((Agraphinfo_t*)AGDATA(g))->rn)
408 #define GD_set_type(g) (((Agraphinfo_t*)AGDATA(g))->set_type)
409 #define GD_label_pos(g) (((Agraphinfo_t*)AGDATA(g))->label_pos)
410 #define GD_showboxes(g) (((Agraphinfo_t*)AGDATA(g))->showboxes)
411 #define GD_fontnames(g) (((Agraphinfo_t*)AGDATA(g))->fontnames)
412 #define GD_spring(g) (((Agraphinfo_t*)AGDATA(g))->spring)
413 #define GD_sum_t(g) (((Agraphinfo_t*)AGDATA(g))->sum_t)
414 #define GD_t(g) (((Agraphinfo_t*)AGDATA(g))->t)
415 
416  typedef struct Agnodeinfo_t {
419  void *shape_info;
421  double width; /* inches */
422  double height; /* inches */
424  double ht;
425  double lw;
426  double rw;
429  void *alg;
430  char state;
431  unsigned char gui_state; /* Node state for GUI ops */
432  boolean clustnode;
433 
434 #ifndef DOT_ONLY
435  unsigned char pinned;
436  int id;
438  int hops;
439  double *pos;
440  double dist;
441 #endif
442 #ifndef NEATO_ONLY
443  unsigned char showboxes;
444  boolean has_port;
447 
448  /* fast graph */
449  char node_type;
450  char mark;
451  char onstack;
452  char ranktype;
462 
463  /* for union-find and collapsing nodes */
464  int UF_size;
468 
469  /* for placing nodes */
470  int rank;
471  int order; /* initially, order = 1 for ordered edges */
472  double mval;
475 
476  /* for network-simplex */
480  int low;
481  int lim;
482  int priority;
483 
484  double pad[1];
485 #endif
486 
487  } Agnodeinfo_t;
488 
489 #define ND_id(n) (((Agnodeinfo_t*)AGDATA(n))->id)
490 #define ND_alg(n) (((Agnodeinfo_t*)AGDATA(n))->alg)
491 #define ND_UF_parent(n) (((Agnodeinfo_t*)AGDATA(n))->UF_parent)
492 #define ND_set(n) (((Agnodeinfo_t*)AGDATA(n))->set)
493 #define ND_UF_size(n) (((Agnodeinfo_t*)AGDATA(n))->UF_size)
494 #define ND_bb(n) (((Agnodeinfo_t*)AGDATA(n))->bb)
495 #define ND_clust(n) (((Agnodeinfo_t*)AGDATA(n))->clust)
496 #define ND_coord(n) (((Agnodeinfo_t*)AGDATA(n))->coord)
497 #define ND_dist(n) (((Agnodeinfo_t*)AGDATA(n))->dist)
498 #define ND_flat_in(n) (((Agnodeinfo_t*)AGDATA(n))->flat_in)
499 #define ND_flat_out(n) (((Agnodeinfo_t*)AGDATA(n))->flat_out)
500 #define ND_gui_state(n) (((Agnodeinfo_t*)AGDATA(n))->gui_state)
501 #define ND_has_port(n) (((Agnodeinfo_t*)AGDATA(n))->has_port)
502 #define ND_rep(n) (((Agnodeinfo_t*)AGDATA(n))->rep)
503 #define ND_heapindex(n) (((Agnodeinfo_t*)AGDATA(n))->heapindex)
504 #define ND_height(n) (((Agnodeinfo_t*)AGDATA(n))->height)
505 #define ND_hops(n) (((Agnodeinfo_t*)AGDATA(n))->hops)
506 #define ND_ht(n) (((Agnodeinfo_t*)AGDATA(n))->ht)
507 #define ND_in(n) (((Agnodeinfo_t*)AGDATA(n))->in)
508 #define ND_inleaf(n) (((Agnodeinfo_t*)AGDATA(n))->inleaf)
509 #define ND_label(n) (((Agnodeinfo_t*)AGDATA(n))->label)
510 #define ND_xlabel(n) (((Agnodeinfo_t*)AGDATA(n))->xlabel)
511 #define ND_lim(n) (((Agnodeinfo_t*)AGDATA(n))->lim)
512 #define ND_low(n) (((Agnodeinfo_t*)AGDATA(n))->low)
513 #define ND_lw(n) (((Agnodeinfo_t*)AGDATA(n))->lw)
514 #define ND_mark(n) (((Agnodeinfo_t*)AGDATA(n))->mark)
515 #define ND_mval(n) (((Agnodeinfo_t*)AGDATA(n))->mval)
516 #define ND_n_cluster(n) (((Agnodeinfo_t*)AGDATA(n))->n_cluster)
517 #define ND_next(n) (((Agnodeinfo_t*)AGDATA(n))->next)
518 #define ND_node_type(n) (((Agnodeinfo_t*)AGDATA(n))->node_type)
519 #define ND_onstack(n) (((Agnodeinfo_t*)AGDATA(n))->onstack)
520 #define ND_order(n) (((Agnodeinfo_t*)AGDATA(n))->order)
521 #define ND_other(n) (((Agnodeinfo_t*)AGDATA(n))->other)
522 #define ND_out(n) (((Agnodeinfo_t*)AGDATA(n))->out)
523 #define ND_outleaf(n) (((Agnodeinfo_t*)AGDATA(n))->outleaf)
524 #define ND_par(n) (((Agnodeinfo_t*)AGDATA(n))->par)
525 #define ND_pinned(n) (((Agnodeinfo_t*)AGDATA(n))->pinned)
526 #define ND_pos(n) (((Agnodeinfo_t*)AGDATA(n))->pos)
527 #define ND_prev(n) (((Agnodeinfo_t*)AGDATA(n))->prev)
528 #define ND_priority(n) (((Agnodeinfo_t*)AGDATA(n))->priority)
529 #define ND_rank(n) (((Agnodeinfo_t*)AGDATA(n))->rank)
530 #define ND_ranktype(n) (((Agnodeinfo_t*)AGDATA(n))->ranktype)
531 #define ND_rw(n) (((Agnodeinfo_t*)AGDATA(n))->rw)
532 #define ND_save_in(n) (((Agnodeinfo_t*)AGDATA(n))->save_in)
533 #define ND_save_out(n) (((Agnodeinfo_t*)AGDATA(n))->save_out)
534 #define ND_shape(n) (((Agnodeinfo_t*)AGDATA(n))->shape)
535 #define ND_shape_info(n) (((Agnodeinfo_t*)AGDATA(n))->shape_info)
536 #define ND_showboxes(n) (((Agnodeinfo_t*)AGDATA(n))->showboxes)
537 #define ND_state(n) (((Agnodeinfo_t*)AGDATA(n))->state)
538 #define ND_clustnode(n) (((Agnodeinfo_t*)AGDATA(n))->clustnode)
539 #define ND_tree_in(n) (((Agnodeinfo_t*)AGDATA(n))->tree_in)
540 #define ND_tree_out(n) (((Agnodeinfo_t*)AGDATA(n))->tree_out)
541 #define ND_weight_class(n) (((Agnodeinfo_t*)AGDATA(n))->weight_class)
542 #define ND_width(n) (((Agnodeinfo_t*)AGDATA(n))->width)
543 #define ND_xsize(n) (ND_lw(n)+ND_rw(n))
544 #define ND_ysize(n) (ND_ht(n))
545 
546  typedef struct Agedgeinfo_t {
555  char edge_type;
556  char compound;
557  char adjacent; /* true for flat edge with adjacent nodes */
559  unsigned char gui_state; /* Edge state for GUI ops */
560  edge_t *to_orig; /* for dot's shapes.c */
561  void *alg;
562 
563 #ifndef DOT_ONLY
564  double factor;
565  double dist;
567 #endif
568 #ifndef NEATO_ONLY
569  unsigned char showboxes;
570  boolean conc_opp_flag;
571  short xpenalty;
572  int weight;
573  int cutvalue;
575  short count;
576  unsigned short minlen;
578 #endif
579  } Agedgeinfo_t;
580 
581 #define ED_alg(e) (((Agedgeinfo_t*)AGDATA(e))->alg)
582 #define ED_conc_opp_flag(e) (((Agedgeinfo_t*)AGDATA(e))->conc_opp_flag)
583 #define ED_count(e) (((Agedgeinfo_t*)AGDATA(e))->count)
584 #define ED_cutvalue(e) (((Agedgeinfo_t*)AGDATA(e))->cutvalue)
585 #define ED_edge_type(e) (((Agedgeinfo_t*)AGDATA(e))->edge_type)
586 #define ED_compound(e) (((Agedgeinfo_t*)AGDATA(e))->compound)
587 #define ED_adjacent(e) (((Agedgeinfo_t*)AGDATA(e))->adjacent)
588 #define ED_factor(e) (((Agedgeinfo_t*)AGDATA(e))->factor)
589 #define ED_gui_state(e) (((Agedgeinfo_t*)AGDATA(e))->gui_state)
590 #define ED_head_label(e) (((Agedgeinfo_t*)AGDATA(e))->head_label)
591 #define ED_head_port(e) (((Agedgeinfo_t*)AGDATA(e))->head_port)
592 #define ED_label(e) (((Agedgeinfo_t*)AGDATA(e))->label)
593 #define ED_xlabel(e) (((Agedgeinfo_t*)AGDATA(e))->xlabel)
594 #define ED_label_ontop(e) (((Agedgeinfo_t*)AGDATA(e))->label_ontop)
595 #define ED_minlen(e) (((Agedgeinfo_t*)AGDATA(e))->minlen)
596 #define ED_path(e) (((Agedgeinfo_t*)AGDATA(e))->path)
597 #define ED_showboxes(e) (((Agedgeinfo_t*)AGDATA(e))->showboxes)
598 #define ED_spl(e) (((Agedgeinfo_t*)AGDATA(e))->spl)
599 #define ED_tail_label(e) (((Agedgeinfo_t*)AGDATA(e))->tail_label)
600 #define ED_tail_port(e) (((Agedgeinfo_t*)AGDATA(e))->tail_port)
601 #define ED_to_orig(e) (((Agedgeinfo_t*)AGDATA(e))->to_orig)
602 #define ED_to_virt(e) (((Agedgeinfo_t*)AGDATA(e))->to_virt)
603 #define ED_tree_index(e) (((Agedgeinfo_t*)AGDATA(e))->tree_index)
604 #define ED_xpenalty(e) (((Agedgeinfo_t*)AGDATA(e))->xpenalty)
605 #define ED_dist(e) (((Agedgeinfo_t*)AGDATA(e))->dist)
606 #define ED_weight(e) (((Agedgeinfo_t*)AGDATA(e))->weight)
607 
608 #define ag_xget(x,a) agxget(x,a)
609 #define SET_RANKDIR(g,rd) (GD_rankdir2(g) = rd)
610 #define agfindedge(g,t,h) (agedge(g,t,h,NULL,0))
611 #define agfindnode(g,n) (agnode(g,n,0))
612 #define agfindgraphattr(g,a) (agattr(g,AGRAPH,a,NULL))
613 #define agfindnodeattr(g,a) (agattr(g,AGNODE,a,NULL))
614 #define agfindedgeattr(g,a) (agattr(g,AGEDGE,a,NULL))
615 
616  typedef struct {
617  int flags;
619 
620 #ifdef __cplusplus
621 }
622 #endif
623 #endif
int tree_index
Definition: types.h:574
void * data
Definition: types.h:105
double pht1
Definition: types.h:217
double factor
Definition: types.h:564
double skew
Definition: types.h:152
port start
Definition: types.h:101
int sidemask
Definition: types.h:95
unsigned char gui_state
Definition: types.h:431
textlabel_t * label
Definition: types.h:551
elist save_out
Definition: types.h:474
Definition: types.h:67
int eflag
Definition: types.h:112
layout_t * drawing
Definition: types.h:281
boxf nb
Definition: types.h:93
struct layout_t layout_t
node_t * prev
Definition: types.h:455
int size
Definition: types.h:110
int option
Definition: types.h:153
double ht1
Definition: types.h:290
double ht1
Definition: types.h:215
unsigned char showboxes
Definition: types.h:569
htmllabel_t * html
Definition: types.h:139
pointf np
Definition: types.h:94
boolean set
Definition: types.h:142
boolean clip
Definition: types.h:75
char onstack
Definition: types.h:451
boolean conc_opp_flag
Definition: types.h:570
double ** sum_t
Definition: types.h:303
int nstrokes
Definition: types.h:171
node_t ** store
Definition: types.h:198
unsigned char boolean
Definition: types.h:24
unsigned char showboxes
Definition: types.h:443
pointf size
Definition: types.h:246
Definition: types.h:245
boolean has_flat_edges
Definition: types.h:331
graph_t ** clust
Definition: types.h:311
double distortion
Definition: types.h:151
int hops
Definition: types.h:438
shape_functions * fns
Definition: types.h:190
edge_t * to_orig
Definition: types.h:560
char * id
Definition: types.h:241
pointf border[4]
Definition: types.h:284
stroke_t * strokes
Definition: types.h:172
int ranksep
Definition: types.h:338
unsigned char LR
Definition: types.h:252
boolean has_port
Definition: types.h:444
Definition: types.h:117
boolean exact_ranksep
Definition: types.h:349
short count
Definition: types.h:575
double width
Definition: types.h:421
long n_nodes
Definition: types.h:325
textlabel_t * tail_label
Definition: types.h:553
char ranktype
Definition: types.h:452
boolean has_images
Definition: types.h:287
int size
Definition: types.h:119
int heapindex
Definition: types.h:437
struct nodequeue nodequeue
node_t ** head
Definition: types.h:200
Definition: geom.h:28
char * text
Definition: types.h:124
elist tree_in
Definition: types.h:477
boolean valid
Definition: types.h:220
char * fontcolor
Definition: types.h:126
int(* bsearch_cmpf)(const void *, const void *)
Definition: types.h:46
int rankdir
Definition: types.h:289
boxf * bp
Definition: types.h:70
struct field_t ** fld
Definition: types.h:250
Agrec_t hdr
Definition: types.h:417
char weight_class
Definition: types.h:453
int lim
Definition: types.h:481
node_t * outleaf
Definition: types.h:467
boolean html
Definition: types.h:143
char * name
Definition: types.h:189
double ht
Definition: types.h:424
void(* codefn)(GVJ_t *job, node_t *n)
Definition: types.h:183
textlabel_t * label
Definition: types.h:427
void * alg
Definition: types.h:561
struct splines splines
edge_t * to_virt
Definition: types.h:577
char installed
Definition: types.h:346
node_t ** list
Definition: types.h:257
double pht2
Definition: types.h:218
double ratio
Definition: types.h:231
boolean(* insidefn)(inside_t *inside_context, pointf)
Definition: types.h:181
unsigned char side
Definition: types.h:78
Definition: types.h:226
Definition: types.h:170
node_t * minrep
Definition: types.h:317
textlabel_t * label
Definition: types.h:282
double fontsize
Definition: types.h:128
boolean has_sinkrank
Definition: types.h:333
int nodesep
Definition: types.h:337
node_t * next
Definition: types.h:454
boolean constrained
Definition: types.h:74
boxf b
Definition: types.h:247
boxf bb
Definition: types.h:283
textspan_t * span
Definition: types.h:136
struct field_t field_t
double rw
Definition: types.h:426
textlabel_t * xlabel
Definition: types.h:554
Definition: gvcjob.h:271
port tail_port
Definition: types.h:549
boxf bb
Definition: types.h:423
bezier * list
Definition: types.h:118
boolean filled
Definition: types.h:236
int ncols
Definition: types.h:206
double orientation
Definition: types.h:150
boolean centered
Definition: types.h:238
struct adjmatrix_t adjmatrix_t
struct inside_t::@18 a
boxf * boxes
Definition: types.h:104
double dist
Definition: types.h:440
node_t * inleaf
Definition: types.h:466
unsigned short odim
Definition: types.h:306
node_t * rn
Definition: types.h:340
pointf * vertices
Definition: types.h:161
elist tree_out
Definition: types.h:478
shape_kind
Definition: types.h:186
double * pos
Definition: types.h:439
int move
Definition: types.h:300
boolean expanded
Definition: types.h:345
struct path path
struct textlabel_t::@20::@21 txt
elist out
Definition: types.h:457
struct nlist_t nlist_t
boolean ignoreSwap
Definition: types.h:88
short xpenalty
Definition: types.h:571
nlist_t comp
Definition: types.h:321
struct rank_t rank_t
int order
Definition: types.h:471
int an
Definition: types.h:213
char * data
Definition: types.h:207
int level
Definition: types.h:316
double lw
Definition: types.h:425
Definition: types.h:276
short maxrank
Definition: types.h:328
unsigned char order
Definition: types.h:77
node_t * maxset
Definition: types.h:324
node_t ** rankleader
Definition: types.h:344
int charset
Definition: types.h:127
pointf pos
Definition: types.h:133
Definition: types.h:261
int
Definition: grammar.c:1264
textlabel_t * head_label
Definition: types.h:552
node_t * set
Definition: types.h:446
Definition: types.h:226
fontname_kind
Definition: types.h:276
edge_t * par
Definition: types.h:479
elist flat_out
Definition: types.h:458
elist other
Definition: types.h:460
int sflag
Definition: types.h:111
double height
Definition: types.h:422
Definition: gvcint.h:70
Definition: types.h:186
node_t ** av
Definition: types.h:214
short minrank
Definition: types.h:327
node_t * minset
Definition: types.h:323
int n
Definition: types.h:211
Definition: types.h:225
boolean isOrtho
Definition: types.h:89
node_t * nlist
Definition: types.h:313
GVC_t * gvc
Definition: types.h:294
ratio_t
Definition: types.h:225
struct polygon_t polygon_t
pointf sp
Definition: types.h:113
int boxn
Definition: types.h:96
void * shape_info
Definition: types.h:419
int id
Definition: types.h:436
char mark
Definition: types.h:450
int n_flds
Definition: types.h:248
int(* qsort_cmpf)(const void *, const void *)
Definition: types.h:45
double mval
Definition: types.h:472
char adjacent
Definition: types.h:557
struct elist elist
char valign
Definition: types.h:141
double *** t
Definition: types.h:304
int cache_nc
Definition: types.h:221
double scale
Definition: types.h:230
double ht2
Definition: types.h:216
char edge_type
Definition: types.h:555
edge_t ** list
Definition: types.h:262
int sides
Definition: types.h:149
pointf * list
Definition: types.h:109
Agrec_t hdr
Definition: types.h:547
textlabel_t * lp
Definition: types.h:249
char label_ontop
Definition: types.h:558
struct pointf_s pointf
pointf dimen
Definition: types.h:129
double ** spring
Definition: types.h:302
rank_t * rank
Definition: types.h:314
boxf boxes[20]
Definition: types.h:97
Definition: cgraph.h:83
void * xdots
Definition: types.h:240
double theta
Definition: types.h:69
unsigned char showboxes
Definition: types.h:334
int flags
Definition: types.h:160
int nvertices
Definition: types.h:159
shape_desc * shape
Definition: types.h:418
graph_t * parent
Definition: types.h:315
node_t * maxrep
Definition: types.h:318
int(* pboxfn)(node_t *n, port *p, int side, boxf rv[], int *kptr)
Definition: types.h:182
int n_cluster
Definition: types.h:310
node_t * leader
Definition: types.h:343
adjmatrix_t * flat
Definition: types.h:222
pointf ep
Definition: types.h:114
boolean candidate
Definition: types.h:219
double ** dist
Definition: types.h:301
Definition: types.h:226
int rank
Definition: types.h:470
Ppolyline_t path
Definition: types.h:566
struct bezier bezier
node_t ** limit
Definition: types.h:199
union inside_t inside_t
node_t * ln
Definition: types.h:339
int priority
Definition: types.h:482
int low
Definition: types.h:480
char compound
Definition: types.h:556
char label_pos
Definition: types.h:348
node_t ** v
Definition: types.h:212
struct shape_functions shape_functions
splines * spl
Definition: types.h:548
boolean has_sourcerank
Definition: types.h:332
node_t ** neato_nlist
Definition: types.h:299
pointf * p
Definition: types.h:58
elist save_in
Definition: types.h:473
boxf bb
Definition: types.h:120
unsigned short minlen
Definition: types.h:576
pointf coord
Definition: types.h:420
Definition: types.h:186
boxf * bp
Definition: types.h:63
double quantum
Definition: types.h:229
pointf p
Definition: types.h:68
Definition: types.h:108
node_t * n
Definition: types.h:62
char * name
Definition: types.h:82
void(* initfn)(node_t *)
Definition: types.h:178
int nrows
Definition: types.h:205
struct inside_t::@19 s
unsigned short flags
Definition: types.h:292
int regular
Definition: types.h:147
void(* freefn)(node_t *)
Definition: types.h:179
unsigned char charset
Definition: types.h:288
double dpi
Definition: types.h:232
unsigned short ndim
Definition: types.h:305
double ht2
Definition: types.h:291
struct stroke_t stroke_t
struct Agedgeinfo_t Agedgeinfo_t
port head_port
Definition: types.h:550
Definition: types.h:100
int size
Definition: types.h:258
int size
Definition: types.h:263
void(* cleanup)(graph_t *g)
Definition: types.h:295
char node_type
Definition: types.h:449
struct Agraphinfo_t Agraphinfo_t
Definition: types.h:256
pointf size
Definition: types.h:235
Agrec_t hdr
Definition: types.h:279
node_t * rep
Definition: types.h:445
ratio_t ratio_kind
Definition: types.h:239
Definition: types.h:56
char * id
Definition: types.h:251
elist flat_in
Definition: types.h:459
int peripheries
Definition: types.h:148
int UF_size
Definition: types.h:464
fontname_kind fontnames
Definition: types.h:335
double * r
Definition: types.h:59
unsigned char gui_state
Definition: types.h:559
struct Agnodeinfo_t Agnodeinfo_t
textlabel_t * xlabel
Definition: types.h:428
pointf * vertices
Definition: types.h:154
unsigned char gui_state
Definition: types.h:285
double pad[1]
Definition: types.h:484
struct shape_desc shape_desc
elist in
Definition: types.h:456
graph_t * clust
Definition: types.h:461
pointf margin
Definition: types.h:233
int cutvalue
Definition: types.h:573
polygon_t * polygon
Definition: types.h:191
struct shape_t shape_t
Definition: types.h:210
struct port port
int weight
Definition: types.h:572
boolean landscape
Definition: types.h:237
double dist
Definition: types.h:565
void * alg
Definition: types.h:429
char state
Definition: types.h:430
graph_t * dotroot
Definition: types.h:312
struct pathend_t pathend_t
char set_type
Definition: types.h:347
node_t * UF_parent
Definition: types.h:465
int nbox
Definition: types.h:103
node_t ** tail
Definition: types.h:201
union textlabel_t::@20 u
short nspans
Definition: types.h:137
port end
Definition: types.h:102
pointf space
Definition: types.h:130
boolean usershape
Definition: types.h:192
Definition: geom.h:35
struct textlabel_t textlabel_t
unsigned char pinned
Definition: types.h:435
port(* portfn)(node_t *, char *, char *)
Definition: types.h:180
unsigned char sides
Definition: types.h:253
boolean clustnode
Definition: types.h:432
boolean dyna
Definition: types.h:76
void * alg
Definition: types.h:293
boolean defined
Definition: types.h:73
unsigned char has_labels
Definition: types.h:286
char * fontname
Definition: types.h:125
pointf page
Definition: types.h:234