/misc/src/release/graphviz-2.18-1/src/graphviz-2.18/lib/common/types.h

Go to the documentation of this file.
00001 /* $Id: types.h,v 1.59 2008/01/08 18:18:59 ellson Exp $ $Revision: 1.59 $ */
00002 /* vim:set shiftwidth=4 ts=8: */
00003 
00004 /**********************************************************
00005 *      This software is part of the graphviz package      *
00006 *                http://www.graphviz.org/                 *
00007 *                                                         *
00008 *            Copyright (c) 1994-2004 AT&T Corp.           *
00009 *                and is licensed under the                *
00010 *            Common Public License, Version 1.0           *
00011 *                      by AT&T Corp.                      *
00012 *                                                         *
00013 *        Information and Software Systems Research        *
00014 *              AT&T Research, Florham Park NJ             *
00015 **********************************************************/
00016 
00017 #ifndef GV_TYPES_H
00018 #define GV_TYPES_H
00019 
00020 #include <stdio.h>
00021 #include <assert.h>
00022 #include <signal.h>
00023 
00024 typedef unsigned char boolean;
00025 #ifndef NOT
00026 #define NOT(v) (!(v))
00027 #endif
00028 #ifndef FALSE
00029 #define FALSE 0
00030 #endif
00031 #ifndef TRUE
00032 #define TRUE NOT(FALSE)
00033 #endif
00034 
00035 #include "geom.h"
00036 #include "gvcext.h"
00037 #include "pathgeom.h"
00038 #include "textpara.h"
00039 
00040 #ifdef __cplusplus
00041 extern "C" {
00042 #endif
00043 
00044     typedef int (*qsort_cmpf) (const void *, const void *);
00045     typedef int (*bsearch_cmpf) (const void *, const void *);
00046 
00047     typedef struct Agraph_t graph_t;
00048     typedef struct Agnode_t node_t;
00049     typedef struct Agedge_t edge_t;
00050     typedef struct Agsym_t attrsym_t;
00051 
00052     typedef struct htmllabel_t htmllabel_t;
00053 
00054     typedef union inside_t {
00055         struct {
00056             pointf* p;
00057             double* r;
00058         } a;
00059         struct {
00060             node_t* n;
00061             box*    bp;
00062         } s;
00063     } inside_t;
00064 
00065     typedef struct port {       /* internal edge endpoint specification */
00066         point p;                /* aiming point relative to node center */
00067         double theta;           /* slope in radians */
00068         box *bp;                /* if not null, points to bbox of 
00069                                  * rectangular area that is port target
00070                                  */
00071         boolean defined;        /* if true, edge has port info at this end */
00072         boolean constrained;    /* if true, constraints such as theta are set */
00073         boolean clip;           /* if true, clip end to node/port shape */
00074         unsigned char order;    /* for mincross */
00075         unsigned char side;     /* if port is on perimeter of node, this
00076                                  * contains the bitwise OR of the sides (TOP,
00077                                  * BOTTOM, etc.) it is on. 
00078                                  */
00079     } port;
00080 
00081     typedef struct {
00082         boolean(*swapEnds) (edge_t * e);        /* Should head and tail be swapped? */
00083         boolean(*splineMerge) (node_t * n);     /* Is n a node in the middle of an edge? */
00084     } splineInfo;
00085 
00086     typedef struct pathend_t {
00087         box nb;                 /* the node box */
00088         point np;               /* node port */
00089         int sidemask;
00090         int boxn;
00091         box boxes[20];
00092     } pathend_t;
00093 
00094     typedef struct path {       /* internal specification for an edge spline */
00095         port start, end;
00096         point *ulpp, *urpp, *llpp, *lrpp;       /* tangents of near splines */
00097         int nbox;               /* number of subdivisions */
00098         box *boxes;             /* rectangular regions of subdivision */
00099         void *data;
00100     } path;
00101 
00102     typedef struct bezier {
00103         point *list;
00104         int size;
00105         int sflag, eflag;
00106         point sp, ep;
00107     } bezier;
00108 
00109     typedef struct splines {
00110         bezier *list;
00111         int size;
00112         boxf bb;
00113     } splines;
00114 
00115 /* fp variants */
00116     typedef struct bezierf {
00117         pointf *list;
00118         int size;
00119         int sflag, eflag;
00120         pointf sp, ep;
00121     } bezierf;
00122 
00123     typedef struct splinesf {
00124         bezierf *list;
00125         int size;
00126     } splinesf;
00127 
00128     typedef struct textlabel_t {
00129         char *text, *fontname, *fontcolor;
00130         double fontsize;
00131         pointf dimen;
00132         point p;
00133         pointf d;               /* delta from resizing */
00134         union {
00135             struct {
00136                 textpara_t *para;
00137                 short nparas;
00138             } txt;
00139             htmllabel_t *html;
00140         } u;
00141         boolean set;            /* true if position is set */
00142         boolean html;           /* true if html label */
00143     } textlabel_t;
00144 
00145     typedef struct polygon_t {  /* mutable shape information for a node */
00146         int regular;            /* true for symmetric shapes */
00147         int peripheries;        /* number of periphery lines */
00148         int sides;              /* number of sides */
00149         double orientation;     /* orientation of shape (+ve degrees) */
00150         double distortion;      /* distortion factor - as in trapezium */
00151         double skew;            /* skew factor - as in parallelogram */
00152         int option;             /* ROUNDED, DIAGONAL corners, etc. */
00153         pointf *vertices;       /* array of vertex points */
00154     } polygon_t;
00155 
00156     typedef struct stroke_t {   /* information about a single stroke */
00157         /* we would have called it a path if that term wasn't already used */
00158         int nvertices;          /* number of points in the stroke */
00159         int flags;              /* stroke style flags */
00160         pointf *vertices;       /* array of vertex points */
00161     } stroke_t;
00162 
00163 /* flag definitions for stroke_t */
00164 #define STROKE_CLOSED (1 << 0)
00165 #define STROKE_FILLED (1 << 1)
00166 #define STROKE_PENDOWN (1 << 2)
00167 #define STROKE_VERTICES_ALLOCATED (1 << 3)
00168 
00169     typedef struct shape_t {    /* mutable shape information for a node */
00170         int nstrokes;           /* number of strokes in array */
00171         stroke_t *strokes;      /* array of strokes */
00172         /* The last stroke must always be closed, but can be pen_up.
00173          * It is used as the clipping path */
00174     } shape_t;
00175 
00176     typedef struct shape_functions {    /* read-only shape functions */
00177         void (*initfn) (node_t *);      /* initializes shape from node u.shape_info structure */
00178         void (*freefn) (node_t *);      /* frees  shape from node u.shape_info structure */
00179          port(*portfn) (node_t *, char *, char *);      /* finds aiming point and slope of port */
00180          boolean(*insidefn) (inside_t * inside_context, pointf);        /* clips incident gvc->e spline on shape of gvc->n */
00181         int (*pboxfn)(node_t* n, port* p, int side, box rv[], int *kptr); /* finds box path to reach port */
00182         void (*codefn) (GVJ_t * job, node_t * n);       /* emits graphics code for node */
00183     } shape_functions;
00184 
00185     typedef enum { SH_UNSET, SH_POLY, SH_RECORD, SH_POINT, SH_EPSF} shape_kind;
00186 
00187     typedef struct shape_desc { /* read-only shape descriptor */
00188         char *name;             /* as read from graph file */
00189         shape_functions *fns;
00190         polygon_t *polygon;     /* base polygon info */
00191         boolean usershape;
00192     } shape_desc;
00193 
00194 #include "usershape.h"          /* usershapes needed by gvc even w/o CODEGENS */
00195 #ifdef WITH_CODEGENS
00196 
00197     struct codegen_s {
00198         void (*reset) (void);
00199         void (*begin_job) (FILE * ofp, graph_t * g, char **lib, char *user,
00200                            char *info[], point pages);
00201         void (*end_job) (void);
00202         void (*begin_graph) (GVC_t * gvc, graph_t * g, box bb, point pb);
00203         void (*end_graph) (void);
00204         void (*begin_page) (graph_t * g, point page, double scale, int rot,
00205                             point offset);
00206         void (*end_page) (void);
00207         void (*begin_layer) (char *layerName, int n, int nLayers);
00208         void (*end_layer) (void);
00209         void (*begin_cluster) (graph_t * g);
00210         void (*end_cluster) (void);
00211         void (*begin_nodes) (void);
00212         void (*end_nodes) (void);
00213         void (*begin_edges) (void);
00214         void (*end_edges) (void);
00215         void (*begin_node) (node_t * n);
00216         void (*end_node) (void);
00217         void (*begin_edge) (edge_t * e);
00218         void (*end_edge) (void);
00219         void (*begin_context) (void);
00220         void (*end_context) (void);
00221         void (*begin_anchor) (char *href, char *tooltip, char *target);
00222         void (*end_anchor) (void);
00223         void (*set_font) (char *fontname, double fontsize);
00224         void (*textpara) (point p, textpara_t * para);
00225         void (*set_pencolor) (char *name);
00226         void (*set_fillcolor) (char *name);
00227         void (*set_style) (char **s);
00228         void (*ellipse) (point p, int rx, int ry, int filled);
00229         void (*polygon) (point * A, int n, int filled);
00230         void (*beziercurve) (point * A, int n, int arrow_at_start,
00231                              int arrow_at_end, int filled);
00232         void (*polyline) (point * A, int n);
00233         boolean bezier_has_arrows;
00234         void (*comment) (char *str);
00235         void (*usershape) (usershape_t *us, boxf b, point * A, int sides, boolean filled);
00236         void (*set_penwidth) (double penwidth);
00237     };
00238 
00239     struct codegen_info_s {
00240         codegen_t *cg;          /* discovered codegen */
00241         char *name;             /* output format, null for sentinel */
00242         int id;                 /* id of output format */
00243         void *info;             /* additional info provided by discovery routine */
00244         /* Quartz uses this to store the Quicktime Component */
00245     };
00246 
00247 #endif
00248 
00249     typedef struct nodequeue {
00250         node_t **store, **limit, **head, **tail;
00251     } nodequeue;
00252 
00253     typedef struct adjmatrix_t {
00254         int nrows, ncols;
00255         char *data;
00256     } adjmatrix_t;
00257 
00258     typedef struct rank_t {
00259         int n;                  /* number of nodes in this rank  */
00260         node_t **v;             /* ordered list of nodes in rank    */
00261         int an;                 /* globally allocated number of nodes   */
00262         node_t **av;            /* allocated list of nodes in rank  */
00263         int ht1, ht2;           /* height below/above centerline    */
00264         int pht1, pht2;         /* as above, but only primitive nodes   */
00265         boolean candidate;      /* for transpose () */
00266         boolean valid;
00267         int cache_nc;           /* caches number of crossings */
00268         adjmatrix_t *flat;
00269     } rank_t;
00270 
00271     typedef enum { R_NONE =
00272             0, R_VALUE, R_FILL, R_COMPRESS, R_AUTO, R_EXPAND } ratio_t;
00273 
00274     typedef struct layout_t {
00275         double quantum;
00276         double scale;
00277         double ratio;           /* set only if ratio_kind == R_VALUE */
00278         double dpi;
00279         point margin;
00280         point page;
00281         point  size;
00282         boolean filled;
00283         boolean landscape;
00284         boolean centered;
00285         ratio_t ratio_kind;
00286     } layout_t;
00287 
00288 /* for "record" shapes */
00289     typedef struct field_t {
00290         point size;             /* its dimension */
00291         box b;                  /* its placement in node's coordinates */
00292         int n_flds;
00293         textlabel_t *lp;        /* n_flds == 0 */
00294         struct field_t **fld;   /* n_flds > 0 */
00295         char *id;               /* user's identifier */
00296         unsigned char LR;       /* if box list is horizontal (left to right) */
00297         unsigned char sides;    /* sides of node exposed to field */
00298     } field_t;
00299 
00300     typedef struct nlist_t {
00301         node_t **list;
00302         int size;
00303     } nlist_t;
00304 
00305     typedef struct elist {
00306         edge_t **list;
00307         int size;
00308     } elist;
00309 
00310 #define GUI_STATE_ACTIVE    (1<<0)
00311 #define GUI_STATE_SELECTED  (1<<1)
00312 #define GUI_STATE_VISITED   (1<<2)
00313 #define GUI_STATE_DELETED   (1<<3)
00314 
00315 #define elist_fastapp(item,L) do {L.list[L.size++] = item; L.list[L.size] = NULL;} while(0)
00316 #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)
00317 #define alloc_elist(n,L)      do {L.size = 0; L.list = N_NEW(n + 1,edge_t*); } while (0)
00318 #define free_list(L)          do {if (L.list) free(L.list);} while (0)
00319 
00320 typedef enum {NATIVEFONTS,PSFONTS,SVGFONTS} fontname_kind;
00321 
00322     typedef struct Agraphinfo_t {
00323         /* to generate code */
00324         layout_t *drawing;
00325         textlabel_t *label;     /* if the cluster has a title */
00326         box bb;                 /* bounding box */
00327         point border[4];        /* sizes of margins for graph labels */
00328         unsigned char gui_state; /* Graph state for GUI ops */
00329         unsigned char has_labels;
00330         boolean has_images;
00331         unsigned char charset; /* input character set */
00332         int rankdir;
00333         int ht1, ht2;   /* below and above extremal ranks */
00334         unsigned short flags;
00335         void *alg;
00336         GVC_t *gvc;     /* context for "globals" over multiple graphs */
00337         void (*cleanup) (graph_t * g);   /* function to deallocate layout-specific data */
00338 
00339 #ifndef DOT_ONLY
00340         /* to place nodes */
00341         node_t **neato_nlist;
00342         int move;
00343         double **dist, **spring, **sum_t, ***t;
00344         int ndim;
00345 #endif
00346 #ifndef NEATO_ONLY
00347         /* to have subgraphs */
00348         int n_cluster;
00349         graph_t **clust;        /* clusters are in clust[1..n_cluster] !!! */
00350         node_t *nlist;
00351         rank_t *rank;
00352         /* fast graph node list */
00353         nlist_t comp;
00354         /* connected components */
00355         node_t *minset, *maxset;        /* set leaders */
00356         long n_nodes;
00357         /* includes virtual */
00358         short minrank, maxrank;
00359 
00360         /* various flags */
00361         boolean has_flat_edges;
00362         unsigned char   showboxes;
00363         boolean cluster_was_collapsed;
00364         fontname_kind fontnames;                /* to override mangling in SVG */
00365 
00366         int nodesep, ranksep;
00367         node_t *ln, *rn;        /* left, right nodes of bounding box */
00368 
00369 
00370         /* for clusters */
00371         node_t *leader, **rankleader;
00372         boolean expanded;
00373         char installed;
00374         char set_type;
00375         char label_pos;
00376         boolean exact_ranksep;
00377 #endif
00378 
00379     } Agraphinfo_t;
00380 
00381 #define GD_alg(g) (g)->u.alg
00382 #define GD_bb(g) (g)->u.bb
00383 #define GD_border(g) (g)->u.border
00384 #define GD_cl_cnt(g) (g)->u.cl_cnt
00385 #define GD_cleanup(g) (g)->u.cleanup
00386 #define GD_clust(g) (g)->u.clust
00387 #define GD_cluster_was_collapsed(g) (g)->u.cluster_was_collapsed
00388 #define GD_comp(g) (g)->u.comp
00389 #define GD_dist(g) (g)->u.dist
00390 #define GD_drawing(g) (g)->u.drawing
00391 #define GD_exact_ranksep(g) (g)->u.exact_ranksep
00392 #define GD_expanded(g) (g)->u.expanded
00393 #define GD_flags(g) (g)->u.flags
00394 #define GD_gui_state(g) (g)->u.gui_state
00395 #define GD_gvc(g) (g)->u.gvc
00396 #define GD_charset(g) (g)->u.charset
00397 #define GD_has_labels(g) (g)->u.has_labels
00398 #define GD_has_images(g) (g)->u.has_images
00399 #define GD_has_flat_edges(g) (g)->u.has_flat_edges
00400 #define GD_ht1(g) (g)->u.ht1
00401 #define GD_ht2(g) (g)->u.ht2
00402 #define GD_inleaf(g) (g)->u.inleaf
00403 #define GD_installed(g) (g)->u.installed
00404 #define GD_label(g) (g)->u.label
00405 #define GD_leader(g) (g)->u.leader
00406 #define GD_rankdir(g) ((g)->u.rankdir & 0x3)
00407 #define GD_flip(g) (GD_rankdir(g) & 1)
00408 #define GD_realrankdir(g) ((g)->u.rankdir >> 2)
00409 #define GD_realflip(g) (GD_realrankdir(g) & 1)
00410 #define GD_ln(g) (g)->u.ln
00411 #define GD_maxrank(g) (g)->u.maxrank
00412 #define GD_maxset(g) (g)->u.maxset
00413 #define GD_minrank(g) (g)->u.minrank
00414 #define GD_minset(g) (g)->u.minset
00415 #define GD_move(g) (g)->u.move
00416 #define GD_n_cluster(g) (g)->u.n_cluster
00417 #define GD_n_nodes(g) (g)->u.n_nodes
00418 #define GD_ndim(g) (g)->u.ndim
00419 #define GD_neato_nlist(g) (g)->u.neato_nlist
00420 #define GD_nlist(g) (g)->u.nlist
00421 #define GD_nodesep(g) (g)->u.nodesep
00422 #define GD_outleaf(g) (g)->u.outleaf
00423 #define GD_rank(g) (g)->u.rank
00424 #define GD_rankleader(g) (g)->u.rankleader
00425 #define GD_ranksep(g) (g)->u.ranksep
00426 #define GD_rn(g) (g)->u.rn
00427 #define GD_set_type(g) (g)->u.set_type
00428 #define GD_label_pos(g) (g)->u.label_pos
00429 #define GD_showboxes(g) (g)->u.showboxes
00430 #define GD_fontnames(g) (g)->u.fontnames
00431 #define GD_spring(g) (g)->u.spring
00432 #define GD_sum_t(g) (g)->u.sum_t
00433 #define GD_t(g) (g)->u.t
00434 
00435     typedef struct Agnodeinfo_t {
00436         shape_desc *shape;
00437         void *shape_info;
00438         point coord;
00439         double width, height;
00440         boxf bb;
00441         int ht, lw, rw;
00442         textlabel_t *label;
00443         void *alg;
00444         char state;
00445         unsigned char gui_state; /* Node state for GUI ops */
00446         boolean clustnode;
00447 
00448 #ifndef DOT_ONLY
00449         unsigned char pinned;
00450         short xsize, ysize;
00451         int id, heapindex, hops;
00452         double *pos, dist;
00453 #endif
00454 #ifndef NEATO_ONLY
00455         unsigned char showboxes;
00456         boolean  has_port;
00457 
00458         /* fast graph */
00459         char node_type, mark, onstack;
00460         char ranktype, weight_class;
00461         node_t *next, *prev;
00462         elist in, out, flat_out, flat_in, other;
00463         graph_t *clust;
00464 
00465         /* for union-find and collapsing nodes */
00466         int UF_size;
00467         node_t *UF_parent;
00468         node_t *inleaf, *outleaf;
00469 
00470         /* for placing nodes */
00471         int rank, order;        /* initially, order = 1 for ordered edges */
00472         int mval;
00473         elist save_in, save_out;
00474 
00475         /* for network-simplex */
00476         elist tree_in, tree_out;
00477         edge_t *par;
00478         int low, lim;
00479         int priority;
00480 
00481         double pad[1];
00482 #endif
00483 
00484     } Agnodeinfo_t;
00485 
00486 #define ND_UF_parent(n) (n)->u.UF_parent
00487 #define ND_UF_size(n) (n)->u.UF_size
00488 #define ND_alg(n) (n)->u.alg
00489 #define ND_bb(n) (n)->u.bb
00490 #define ND_clust(n) (n)->u.clust
00491 #define ND_coord_i(n) (n)->u.coord
00492 #define ND_dist(n) (n)->u.dist
00493 #define ND_flat_in(n) (n)->u.flat_in
00494 #define ND_flat_out(n) (n)->u.flat_out
00495 #define ND_gui_state(n) (n)->u.gui_state
00496 #define ND_has_port(n) (n)->u.has_port
00497 #define ND_heapindex(n) (n)->u.heapindex
00498 #define ND_height(n) (n)->u.height
00499 #define ND_hops(n) (n)->u.hops
00500 #define ND_ht_i(n) (n)->u.ht
00501 #define ND_id(n) (n)->u.id
00502 #define ND_in(n) (n)->u.in
00503 #define ND_inleaf(n) (n)->u.inleaf
00504 #define ND_label(n) (n)->u.label
00505 #define ND_lim(n) (n)->u.lim
00506 #define ND_low(n) (n)->u.low
00507 #define ND_lw_i(n) (n)->u.lw
00508 #define ND_mark(n) (n)->u.mark
00509 #define ND_mval(n) (n)->u.mval
00510 #define ND_n_cluster(n) (n)->u.n_cluster
00511 #define ND_next(n) (n)->u.next
00512 #define ND_node_type(n) (n)->u.node_type
00513 #define ND_onstack(n) (n)->u.onstack
00514 #define ND_order(n) (n)->u.order
00515 #define ND_other(n) (n)->u.other
00516 #define ND_out(n) (n)->u.out
00517 #define ND_outleaf(n) (n)->u.outleaf
00518 #define ND_par(n) (n)->u.par
00519 #define ND_pinned(n) (n)->u.pinned
00520 #define ND_pos(n) (n)->u.pos
00521 #define ND_prev(n) (n)->u.prev
00522 #define ND_priority(n) (n)->u.priority
00523 #define ND_rank(n) (n)->u.rank
00524 #define ND_ranktype(n) (n)->u.ranktype
00525 #define ND_rw_i(n) (n)->u.rw
00526 #define ND_save_in(n) (n)->u.save_in
00527 #define ND_save_out(n) (n)->u.save_out
00528 #define ND_shape(n) (n)->u.shape
00529 #define ND_shape_info(n) (n)->u.shape_info
00530 #define ND_showboxes(n) (n)->u.showboxes
00531 #define ND_state(n) (n)->u.state
00532 #define ND_clustnode(n) (n)->u.clustnode
00533 #define ND_tree_in(n) (n)->u.tree_in
00534 #define ND_tree_out(n) (n)->u.tree_out
00535 #define ND_weight_class(n) (n)->u.weight_class
00536 #define ND_width(n) (n)->u.width
00537 #define ND_xsize(n) (n)->u.xsize
00538 #define ND_ysize(n) (n)->u.ysize
00539 
00540     typedef struct Agedgeinfo_t {
00541         splines *spl;
00542         port tail_port, head_port;      /* might be used someday */
00543         textlabel_t *label, *head_label, *tail_label;
00544         char edge_type;
00545         char adjacent;          /* true for flat edge with adjacent nodes */
00546         char label_ontop;
00547         unsigned char gui_state; /* Edge state for GUI ops */
00548         edge_t *to_orig;        /* for dot's shapes.c    */
00549         void *alg;
00550 
00551 #ifndef DOT_ONLY
00552         double factor;
00553         double dist;
00554         Ppolyline_t path;
00555 #endif
00556 #ifndef NEATO_ONLY
00557         unsigned char showboxes;
00558         boolean conc_opp_flag;
00559         short xpenalty;
00560         int weight;
00561         int cutvalue, tree_index;
00562         short count;
00563         unsigned short minlen;
00564         edge_t *to_virt;
00565 #endif
00566 
00567     } Agedgeinfo_t;
00568 
00569 #define ED_alg(e) (e)->u.alg
00570 #define ED_conc_opp_flag(e) (e)->u.conc_opp_flag
00571 #define ED_count(e) (e)->u.count
00572 #define ED_cutvalue(e) (e)->u.cutvalue
00573 #define ED_dist(e) (e)->u.dist
00574 #define ED_edge_type(e) (e)->u.edge_type
00575 #define ED_adjacent(e) (e)->u.adjacent
00576 #define ED_factor(e) (e)->u.factor
00577 #define ED_gui_state(e) (e)->u.gui_state
00578 #define ED_head_label(e) (e)->u.head_label
00579 #define ED_head_port(e) (e)->u.head_port
00580 #define ED_label(e) (e)->u.label
00581 #define ED_label_ontop(e) (e)->u.label_ontop
00582 #define ED_minlen(e) (e)->u.minlen
00583 #define ED_path(e) (e)->u.path
00584 #define ED_showboxes(e) (e)->u.showboxes
00585 #define ED_spl(e) (e)->u.spl
00586 #define ED_tail_label(e) (e)->u.tail_label
00587 #define ED_tail_port(e) (e)->u.tail_port
00588 #define ED_to_orig(e) (e)->u.to_orig
00589 #define ED_to_virt(e) (e)->u.to_virt
00590 #define ED_tree_index(e) (e)->u.tree_index
00591 #define ED_weight(e) (e)->u.weight
00592 #define ED_xpenalty(e) (e)->u.xpenalty
00593 
00594     typedef struct {
00595         int useGrid;            /* use grid for speed up */
00596         int useNew;             /* encode x-K into attractive force */
00597         int numIters;           /* actual iterations in layout */
00598         int unscaled;           /* % of iterations used in pass 1 */
00599         double C;               /* Repulsion factor in xLayout */
00600         double Tfact;           /* scale temp from default expression */
00601         double K;               /* spring constant; ideal distance */
00602         double T0;              /* initial temperature */
00603     } fdpParms_t;
00604 
00605     typedef struct {
00606         int flags;
00607     } gvlayout_features_t;
00608 
00609 #ifdef __cplusplus
00610 }
00611 #endif
00612 #endif

Generated on Mon Mar 31 19:03:25 2008 for Graphviz by  doxygen 1.5.1