Graphviz  2.35.20130930.0449
render.h
Go to the documentation of this file.
1 
2 
3 /*************************************************************************
4  * Copyright (c) 2011 AT&T Intellectual Property
5  * All rights reserved. This program and the accompanying materials
6  * are made available under the terms of the Eclipse Public License v1.0
7  * which accompanies this distribution, and is available at
8  * http://www.eclipse.org/legal/epl-v10.html
9  *
10  * Contributors: See CVS logs. Details at http://www.graphviz.org/
11  *************************************************************************/
12 
13 #ifndef GV_RENDER_H
14 #define GV_RENDER_H
15 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19 
20 #ifdef HAVE_CONFIG_H
21 #include "config.h"
22 #endif
23 
24 #ifdef HAVE_SYS_TYPES_H
25 #include <sys/types.h>
26 #endif
27 #ifdef HAVE_STDLIB_H
28 #include <stdlib.h>
29 #endif
30 #ifdef HAVE_STDDEF_H
31 #include <stddef.h>
32 #endif
33 #ifdef HAVE_STRINGS_H
34 #include <strings.h>
35 #endif
36 #ifdef HAVE_STRING_H
37 #include <string.h>
38 #endif
39 
40 #include "types.h"
41 #include "macros.h"
42 #include "const.h"
43 #include "globals.h"
44 #include "memory.h"
45 #include "colorprocs.h" /* must collow color.h (in types.h) */
46 #include "geomprocs.h" /* must follow geom.h (in types.h) */
47 #include "agxbuf.h"
48 #include "utils.h" /* must follow types.h and agxbuf.h */
49 #include "gvplugin.h" /* must follow gvcext.h (in types.h) */
50 #include "gvcjob.h" /* must follow gvcext.h (in types.h) */
51 #include "gvcint.h" /* must follow gvcext.h (in types.h) */
52 #include "gvcproc.h" /* must follow gvcext.h (in types.h) */
53 
54  typedef struct epsf_s {
55  int macro_id;
57  } epsf_t;
58 
59  typedef void (*nodesizefn_t) (Agnode_t *, boolean);
60 #ifdef GVDLL
61 #define extern __declspec(dllexport)
62 #else
63 #define extern
64 #endif
65 
66 /*visual studio*/
67 #ifdef WIN32_DLL
68 #ifndef GVC_EXPORTS
69 #define extern __declspec(dllimport)
70 #endif
71 #endif
72 /*end visual studio*/
73 
74  extern void add_box(path *, boxf);
75  extern void arrow_flags(Agedge_t * e, int *sflag, int *eflag);
76  extern boxf arrow_bb(pointf p, pointf u, double arrowsize, int flag);
77  extern void arrow_gen(GVJ_t * job, emit_state_t emit_state, pointf p, pointf u,
78  double arrowsize, double penwidth, int flag);
79  extern double arrow_length(edge_t * e, int flag);
80  extern int arrowEndClip(edge_t*, pointf*, int, int , bezier*, int eflag);
81  extern int arrowStartClip(edge_t*, pointf* ps, int, int, bezier*, int sflag);
82  extern void arrowOrthoClip(edge_t*, pointf* ps, int, int, bezier*, int sflag, int eflag);
83  extern void beginpath(path *, Agedge_t *, int, pathend_t *, boolean);
84  extern void bezier_clip(inside_t * inside_context,
85  boolean(*insidefn) (inside_t * inside_context,
86  pointf p), pointf * sp,
87  boolean left_inside);
88  extern shape_desc *bind_shape(char *name, node_t *);
89  extern void makeStraightEdge(graph_t * g, edge_t * e, int edgetype, splineInfo * info);
90  extern void clip_and_install(edge_t * fe, node_t * hn,
91  pointf * ps, int pn, splineInfo * info);
92  extern char* charsetToStr (int c);
93  extern pointf coord(node_t * n);
94  extern void do_graph_label(graph_t * sg);
95  extern void graph_init(graph_t * g, boolean use_rankdir);
96  extern void graph_cleanup(graph_t * g);
97  extern int dotneato_args_initialize(GVC_t * gvc, int, char **);
98  extern int dotneato_usage(int);
99  extern void dotneato_postprocess(Agraph_t *);
100  extern void gv_postprocess(Agraph_t *, int);
101  extern void dotneato_set_margins(GVC_t * gvc, Agraph_t *);
102  extern void dotneato_write(GVC_t * gvc, graph_t *g);
103  extern void dotneato_write_one(GVC_t * gvc, graph_t *g);
104  extern Ppolyline_t* ellipticWedge (pointf ctr, double major, double minor, double angle0, double angle1);
105  extern void emit_clusters(GVJ_t * job, Agraph_t * g, int flags);
106  extern char* getObjId (GVJ_t* job, void* obj, agxbuf* xb);
107  /* extern void emit_begin_edge(GVJ_t * job, edge_t * e, char**); */
108  /* extern void emit_end_edge(GVJ_t * job); */
109  extern void emit_graph(GVJ_t * job, graph_t * g);
110  extern void emit_label(GVJ_t * job, emit_state_t emit_state, textlabel_t *);
111  extern int emit_once(char *message);
112  extern void emit_jobs_eof(GVC_t * gvc);
113  extern void emit_map_rect(GVJ_t *job, boxf b);
114  extern void enqueue_neighbors(nodequeue *, Agnode_t *, int);
115  extern void endpath(path *, Agedge_t *, int, pathend_t *, boolean);
116  extern void epsf_init(node_t * n);
117  extern void epsf_free(node_t * n);
118  extern shape_desc *find_user_shape(const char *);
119  extern void free_line(textpara_t *);
120  extern void free_label(textlabel_t *);
121  extern void free_textpara(textpara_t * tl, int);
122  extern void getdouble(graph_t * g, char *name, double *result);
123  extern splines *getsplinepoints(edge_t * e);
124  extern void gv_fixLocale (int set);
125  extern void gv_free_splines(edge_t * e);
126  extern void gv_cleanup_edge(Agedge_t * e);
127  extern void gv_cleanup_node(Agnode_t * n);
128  extern void* init_xdot (Agraph_t* g);
129  extern int initMapData (GVJ_t*, char*, char*, char*, char*, char*, void*);
130  extern boolean isPolygon(node_t *);
131  extern void makeSelfEdge(path * P, edge_t * edges[], int ind, int cnt,
132  double sizex, double sizey, splineInfo * sinfo);
133  extern textlabel_t *make_label(void *obj, char *str, int kind, double fontsize, char *fontname, char *fontcolor);
134  extern bezier *new_spline(edge_t * e, int sz);
135  extern char **parse_style(char *s);
136  extern void place_graph_label(Agraph_t *);
137  extern int place_portlabel(edge_t * e, boolean head_p);
138  extern void makePortLabels(edge_t * e);
139  extern pointf edgeMidpoint(graph_t* g, edge_t * e);
140  extern void addEdgeLabels(graph_t* g, edge_t * e, pointf rp, pointf rq);
141  extern void pop_obj_state(GVJ_t *job);
142  extern obj_state_t* push_obj_state(GVJ_t *job);
143  extern int rank(graph_t * g, int balance, int maxiter);
144  extern port resolvePort(node_t* n, node_t* other, port* oldport);
145  extern void resolvePorts (edge_t* e);
146  extern void round_corners(GVJ_t * job, pointf * AF, int sides, int style, int filled);
147  extern int routesplinesinit(void);
148  extern pointf *routesplines(path *, int *);
149  extern void routesplinesterm(void);
150  extern pointf* simpleSplineRoute (pointf, pointf, Ppoly_t, int*, int);
151  extern pointf *routepolylines(path* pp, int* npoints);
152  extern int selfRightSpace (edge_t* e);
153  extern void setup_graph(GVC_t * gvc, graph_t * g);
154  extern shape_kind shapeOf(node_t *);
155  extern void shape_clip(node_t * n, pointf curve[4]);
156  extern void make_simple_label (graph_t* g, textlabel_t* rv);
157  extern int stripedBox (GVJ_t * job, pointf* AF, char* clrs, int rotate);
158  extern stroke_t* taper (bezier*, double (*radfunc_t)(double,double,double), double initwid, int linejoin, int linecap);
159  extern stroke_t* taper0 (bezier* bez, double initwid);
160  extern pointf textsize(graph_t *g, textpara_t * para, char *fontname, double fontsize);
161  extern void translate_bb(Agraph_t *, int);
162  extern int wedgedEllipse (GVJ_t* job, pointf * pf, char* clrs);
163  extern void update_bb_bz(boxf *bb, pointf *cp);
164  extern void write_attributed_dot(graph_t *g, FILE *f);
165  extern void write_canonical_dot(graph_t *g, FILE *f);
166  extern boxf xdotBB (graph_t* g);
167  extern char *findAttrColor(void *obj, attrsym_t *colorattr, char *dflt);
168 
169 #undef extern
170 
171 #ifdef __cplusplus
172 }
173 #endif
174 
175 #endif