Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

const.h

Go to the documentation of this file.
00001 /* $Id: const.h,v 1.1 2005/04/09 03:38:19 roxo Exp $ $Revision: 1.1 $ */
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_CONST_H
00018 #define GV_CONST_H
00019 
00020 #ifndef M_PI
00021 #define M_PI 3.14159265358979323846
00022 #endif
00023 #ifndef PI
00024 #define PI M_PI
00025 #endif
00026 
00027 #define SMALLBUF        128
00028 #define LPAREN          '('
00029 #define RPAREN          ')'
00030 #define LBRACE          '{'
00031 #define RBRACE          '}'
00032 
00033 /*      node,edge types */
00034 #ifdef NORMAL
00035 #undef NORMAL
00036 #endif
00037 #define         NORMAL          0       /* an original input node */
00038 #define         VIRTUAL         1       /* virtual nodes in long edge chains */
00039 #define         SLACKNODE       2       /* encode edges in node position phase */
00040 #define         REVERSED        3       /* reverse of an original edge */
00041 #define         FLATORDER       4       /* for ordered edges */
00042 #define         CLUSTER_EDGE 5  /* for ranking clusters */
00043 #define         IGNORED         6       /* concentrated multi-edges */
00044 
00045 /* collapsed node classifications */
00046 #define         NOCMD           0       /* default */
00047 #define         SAMERANK        1       /* place on same rank */
00048 #define         MINRANK         2       /* place on "least" rank */
00049 #define         SOURCERANK      3       /* strict version of MINRANK */
00050 #define         MAXRANK         4       /* place on "greatest" rank */
00051 #define         SINKRANK        5       /* strict version of MAXRANK */
00052 #define         LEAFSET         6       /* set of collapsed leaf nodes */
00053 #define         CLUSTER         7       /* set of clustered nodes */
00054 
00055 /* type of cluster rank assignment */
00056 #define         LOCAL           100
00057 #define         GLOBAL          101
00058 #define         NOCLUST         102
00059 
00060 /* default attributes */
00061 #define         DEFAULT_COLOR           "black"
00062 #define         DEFAULT_FONTSIZE        14.0
00063 #define         DEFAULT_LABEL_FONTSIZE  11.0    /* for head/taillabel */
00064 #define         MIN_FONTSIZE            1.0
00065 #define         DEFAULT_FONTNAME        "Times-Roman"
00066 #define         DEFAULT_FILL            "lightgrey"
00067 #define         LINESPACING             1.20
00068 
00069 #define         DEFAULT_NODEHEIGHT      0.5
00070 #define         MIN_NODEHEIGHT          0.02
00071 #define         DEFAULT_NODEWIDTH       0.75
00072 #define         MIN_NODEWIDTH           0.01
00073 #define         DEFAULT_NODESHAPE       "ellipse"
00074 
00075 #define         NODENAME_ESC            "\\N"
00076 
00077 #define         DEFAULT_LAYERSEP        ":\t "
00078 
00079 #define         DEFAULT_NODESEP 0.25
00080 #define         MIN_NODESEP             0.02
00081 #define         DEFAULT_RANKSEP 0.5
00082 #define         MIN_RANKSEP             0.02
00083 
00084 /* default margin for paged formats such as PostScript */
00085 #define         DEFAULT_MARGIN  36
00086 
00087 /* default margin for embedded formats such as PNG */
00088 #define         DEFAULT_EMBED_MARGIN    5
00089 
00090 #define         DEFAULT_PAGEHT  792
00091 #define         DEFAULT_PAGEWD  612
00092 
00093 #define         SELF_EDGE_SIZE  18
00094 #define         MC_SCALE        256     /* for mincross */
00095 
00096 #define         PORT_LABEL_DISTANCE     10
00097 #define         PORT_LABEL_ANGLE        -25     /* degrees; pos is CCW, neg is CW */
00098 
00099 /* arrow types */
00100 #define         ARR_NONE         0
00101 
00102 /* sides (e.g. of cluster margins) */
00103 #define         BOTTOM_IX       0
00104 #define         RIGHT_IX        1
00105 #define         TOP_IX          2
00106 #define         LEFT_IX         3
00107 
00108 /* sides of boxes for SHAPE_path */
00109 #define         BOTTOM          (1<<BOTTOM_IX)
00110 #define         RIGHT           (1<<RIGHT_IX)
00111 #define         TOP             (1<<TOP_IX)
00112 #define         LEFT            (1<<LEFT_IX)
00113 
00114 #define CCW  -1                 /* counter clock-wise */
00115 #define CW    1                 /* clock-wise */
00116 
00117 /* Obj types  for renderers */
00118 #define         NONE    0
00119 #define         NODE    1
00120 #define         EDGE    2
00121 #define         CLST    3
00122 
00123 /* output languages */
00124 #define         ATTRIBUTED_DOT  0       /* default */
00125 #define         POSTSCRIPT      1
00126 #define         HPGL            2       /* HP Graphics Language */
00127 #define         PCL             3       /* Printer Control Language */
00128 #define         MIF             4       /* Adobe FrameMaker */
00129 #define         PIC_format      5       /* symbol PIC is used by compilers for 
00130                                            Position Independent Code */
00131 #define         PLAIN           6
00132 #define         PLAIN_EXT       7
00133 
00134 #define         GD              8       /* libgd bitmap format */
00135 #define         memGD           9       /* libgd bitmap format */
00136 #define         GD2             10      /* libgd bitmap format */
00137 #define         GIF             11      /* libgd bitmap format */
00138 #define         JPEG            12      /* libgd bitmap format */
00139 #define         PNG             13      /* libgd bitmap format */
00140 #define         WBMP            14      /* libgd bitmap format */
00141 #define         XBM             15      /* libgd bitmap format */
00142 
00143 #define         ISMAP           16      /* old style map file for httpd servers */
00144 #define         IMAP            17      /* apache map file for httpd servers */
00145 #define         CMAP            18      /* client map file for html browsers */
00146 #define         CMAPX           19      /* client map file for xhtml browsers */
00147 #define         VRML            20
00148 #define         VTX             21      /* visual thought */
00149 #define         METAPOST        22
00150 #define         FIG             23      /* xfig drawing tool */
00151 #define         DIA             24      /* dia drawing tool */
00152 #define         SVG             25      /* Structured Vector Graphics */
00153 #define         SVGZ            26      /* compressed SVG */
00154 #define         CANONICAL_DOT   27      /* wanted for tcl/tk version */
00155 #define         PDF             28
00156 #define         EXTENDED_DOT    29      /* dot with drawing info */
00157 #define         CAIRO_X11       30      /* x11 via cairo */
00158 #define         CAIRO_PNG       31      /* png via cairo */
00159 #define         CAIRO_PS        32      /* ps via cairo */
00160 
00161 #define         QPDF            33      /* Quartz paged PDF */
00162 #define         QEPDF           34      /* Quartz embedded PDF */
00163 
00164 #define         QBM_FIRST 100   /* first Quartz bitmap format, inclusive */
00165 #define         QBM_LAST 200    /* last Quartz bitmap format, exclusive */
00166 
00167 /* for clusters */
00168 #define         CL_BACK         10      /* cost of backward pointing edge */
00169 #define         CL_OFFSET       8       /* margin of cluster box in PS points */
00170 #ifndef MSWIN32
00171 #define         CL_CROSS        1000    /* cost of cluster skeleton edge crossing */
00172 #else
00173 #define         CL_CROSS        100     /* avoid 16 bit overflow */
00174 #endif
00175 
00176 /* edge types */
00177 #define REGULAREDGE 1
00178 #define FLATEDGE    2
00179 #define SELFWPEDGE  4
00180 #define SELFNPEDGE  8
00181 #define SELFEDGE    8
00182 #define EDGETYPEMASK     15     /* the OR of the above */
00183 
00184 /* for graph server */
00185 #define         SERVER_NN       200
00186 #define         SERVER_NE       500
00187 
00188 /* for neato */
00189 #define Spring_coeff    1.0
00190 #define MYHUGE          (1.0e+37)
00191 #define MAXDIM                  10
00192 
00193 /* drawing phases */
00194 #define GVBEGIN         0
00195 #define GVSPLINES       1
00196 
00197 /* existence of labels */
00198 #define EDGE_LABEL              1
00199 #define HEAD_LABEL              2
00200 #define TAIL_LABEL              4
00201 #define GRAPH_LABEL             8
00202 
00203 /* type of graph label: GD_label_pos */
00204 #define LABEL_AT_BOTTOM 0
00205 #define LABEL_AT_TOP    1
00206 #define LABEL_AT_LEFT   2
00207 #define LABEL_AT_RIGHT  4
00208 
00209 /* values specifying rankdir */
00210 #define RANKDIR_TB      0
00211 #define RANKDIR_LR      1
00212 #define RANKDIR_BT      2
00213 #define RANKDIR_RL      3
00214 
00215 /* user-specified node position: ND_pinned */
00216 #define P_SET    1              /* position supplied by user */
00217 #define P_FIX    2              /* position fixed during topological layout */
00218 #define P_PIN    3              /* position fixed */
00219 
00220 #define GAP 4                   /* whitespace in POINTS around labels and between peripheries */
00221 
00222 #endif
Untitled Document Pesquisa Psi SourceForge.net Logo