Graphviz 13.0.0~dev.20241220.2304
Loading...
Searching...
No Matches
render.h File Reference
#include "config.h"
#include <sys/types.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <util/agxbuf.h>
#include <inttypes.h>
#include "types.h"
#include "macros.h"
#include "const.h"
#include "globals.h"
#include "colorprocs.h"
#include "geomprocs.h"
#include "utils.h"
#include "gvplugin.h"
#include "gvcjob.h"
#include "gvcint.h"
#include "gvcproc.h"
Include dependency graph for render.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  epsf_s
 

Typedefs

typedef struct epsf_s epsf_t
 

Functions

void add_box (path *, boxf)
 
void arrow_flags (Agedge_t *e, uint32_t *sflag, uint32_t *eflag)
 
boxf arrow_bb (pointf p, pointf u, double arrowsize)
 
void arrow_gen (GVJ_t *job, emit_state_t emit_state, pointf p, pointf u, double arrowsize, double penwidth, uint32_t flag)
 
size_t arrowEndClip (edge_t *, pointf *, size_t, size_t, bezier *, uint32_t eflag)
 
size_t arrowStartClip (edge_t *, pointf *ps, size_t, size_t, bezier *, uint32_t sflag)
 
void arrowOrthoClip (edge_t *, pointf *ps, size_t, size_t, bezier *, uint32_t sflag, uint32_t eflag)
 
void beginpath (path *, Agedge_t *, int, pathend_t *, bool)
 
void bezier_clip (inside_t *inside_context, bool(*insidefn)(inside_t *inside_context, pointf p), pointf *sp, bool left_inside)
 
shape_descbind_shape (char *name, node_t *)
 
void makeStraightEdge (graph_t *g, edge_t *e, int edgetype, splineInfo *info)
 
void makeStraightEdges (graph_t *g, edge_t **edges, size_t e_cnt, int et, splineInfo *sinfo)
 
void clip_and_install (edge_t *fe, node_t *hn, pointf *ps, size_t pn, splineInfo *info)
 
char * charsetToStr (int c)
 Given an internal charset value, return a canonical string representation.
 
pointf coord (node_t *n)
 
void do_graph_label (graph_t *sg)
 Set characteristics of graph label if it exists.
 
void graph_init (graph_t *g, bool use_rankdir)
 
void graph_cleanup (graph_t *g)
 
int dotneato_args_initialize (GVC_t *gvc, int, char **)
 
int dotneato_usage (const char *, int)
 
void dotneato_postprocess (Agraph_t *)
 
void gv_postprocess (Agraph_t *, int)
 
Ppolyline_tellipticWedge (pointf ctr, double major, double minor, double angle0, double angle1)
 
void emit_clusters (GVJ_t *job, Agraph_t *g, int flags)
 
char * getObjId (GVJ_t *job, void *obj, agxbuf *xb)
 Use id of root graph if any, plus kind and internal id of object.
 
void emit_graph (GVJ_t *job, graph_t *g)
 
void emit_label (GVJ_t *job, emit_state_t emit_state, textlabel_t *)
 
bool emit_once (char *message)
 
void emit_once_reset (void)
 
void emit_map_rect (GVJ_t *job, boxf b)
 
void endpath (path *, Agedge_t *, int, pathend_t *, bool)
 
void epsf_init (node_t *n)
 
void epsf_free (node_t *n)
 
shape_descfind_user_shape (const char *)
 
void free_label (textlabel_t *)
 
void free_textspan (textspan_t *tl, size_t)
 
void getdouble (graph_t *g, char *name, double *result)
 
splinesgetsplinepoints (edge_t *e)
 
void gv_fixLocale (int set)
 
void gv_free_splines (edge_t *e)
 
void gv_cleanup_edge (Agedge_t *e)
 
void gv_cleanup_node (Agnode_t *n)
 
void * init_xdot (Agraph_t *g)
 
int initMapData (GVJ_t *, char *, char *, char *, char *, char *, void *)
 
bool isPolygon (node_t *)
 
void makeSelfEdge (edge_t *edges[], size_t ind, size_t cnt, double sizex, double sizey, splineInfo *sinfo)
 
textlabel_tmake_label (void *obj, char *str, int kind, double fontsize, char *fontname, char *fontcolor)
 
beziernew_spline (edge_t *e, size_t sz)
 
char ** parse_style (char *s)
 
void place_graph_label (Agraph_t *)
 
int place_portlabel (edge_t *e, bool head_p)
 
void makePortLabels (edge_t *e)
 
pointf edgeMidpoint (graph_t *g, edge_t *e)
 
void addEdgeLabels (edge_t *e)
 
void pop_obj_state (GVJ_t *job)
 
obj_state_tpush_obj_state (GVJ_t *job)
 
int rank (graph_t *g, int balance, int maxiter)
 
int rank2 (graph_t *g, int balance, int maxiter, int search_size)
 
port resolvePort (node_t *n, node_t *other, port *oldport)
 
void resolvePorts (edge_t *e)
 
void round_corners (GVJ_t *job, pointf *AF, size_t sides, graphviz_polygon_style_t style, int filled)
 Handle some special graphical cases, such as rounding the shape, adding diagonals at corners, or drawing certain non-simple figures.
 
int routesplinesinit (void)
 
pointfroutesplines (path *, size_t *)
 
void routesplinesterm (void)
 
pointfsimpleSplineRoute (pointf, pointf, Ppoly_t, size_t *, int)
 Given a simple (ccw) polygon, route an edge from tp to hp.
 
pointfroutepolylines (path *pp, size_t *npoints)
 
double selfRightSpace (edge_t *e)
 
shape_kind shapeOf (node_t *)
 
void shape_clip (node_t *n, pointf curve[4])
 
void make_simple_label (GVC_t *gvc, textlabel_t *rv)
 
int stripedBox (GVJ_t *job, pointf *AF, const char *clrs, int rotate)
 
stroke_t taper (bezier *, double(*radfunc_t)(double, double, double), double initwid)
 
pointf textspan_size (GVC_t *gvc, textspan_t *span)
 Estimates size of a textspan, in points.
 
void textfont_dict_open (GVC_t *gvc)
 
void textfont_dict_close (GVC_t *gvc)
 
void translate_bb (Agraph_t *, int)
 
int wedgedEllipse (GVJ_t *job, pointf *pf, const char *clrs)
 
void update_bb_bz (boxf *bb, pointf *cp)
 
boxf xdotBB (graph_t *g)
 

Typedef Documentation

◆ epsf_t

typedef struct epsf_s epsf_t

Function Documentation

◆ add_box()

void add_box ( path P,
boxf  b 
)

Definition at line 348 of file splines.c.

References path::boxes, boxf::LL, path::nbox, boxf::UR, pointf_s::x, and pointf_s::y.

Referenced by completeregularpath(), make_flat_bottom_edges(), make_flat_edge(), and make_flat_labeled_edge().

Here is the caller graph for this function:

◆ addEdgeLabels()

void addEdgeLabels ( edge_t e)

Definition at line 1328 of file splines.c.

References makePortLabels().

Referenced by attachOrthoEdges(), finishEdge(), makePolyline(), makeSpline(), makeStraightEdges(), and spline_edges_().

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

◆ arrow_bb()

boxf arrow_bb ( pointf  p,
pointf  u,
double  arrowsize 
)

Definition at line 1112 of file arrows.c.

References ARROW_LENGTH, dx, dy, EPSILON, boxf::LL, boxf::UR, pointf_s::x, and pointf_s::y.

Referenced by init_splines_bb(), and overlap_arrow().

Here is the caller graph for this function:

◆ arrow_flags()

void arrow_flags ( Agedge_t e,
uint32_t *  sflag,
uint32_t *  eflag 
)

Definition at line 217 of file arrows.c.

References agfindedge, agfindedgeattr, aghead, agisdirected(), agraphof(), agtail, agxget(), ARR_TYPE_NONE, ARR_TYPE_NORM, arrow_flags(), arrow_match_name(), Arrowdirs, arrowdir_t::dir, E_dir, ED_conc_opp_flag, NULL, and streq().

Referenced by arrow_clip(), arrow_flags(), and user_spline().

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

◆ arrow_gen()

void arrow_gen ( GVJ_t job,
emit_state_t  emit_state,
pointf  p,
pointf  u,
double  arrowsize,
double  penwidth,
uint32_t  flag 
)

Definition at line 1150 of file arrows.c.

References ARR_TYPE_NONE, arrow_gen_type(), ARROW_LENGTH, BITS_PER_ARROW, GVC_s::defaultlinestyle, obj_state_s::emit_state, EPSILON, GVJ_s::gvc, gvrender_set_penwidth(), gvrender_set_style(), NUMB_OF_ARROW_HEADS, GVJ_s::obj, penwidth, pointf_s::x, and pointf_s::y.

Referenced by emit_edge_graphics(), and multicolor().

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

◆ arrowEndClip()

size_t arrowEndClip ( edge_t e,
pointf ps,
size_t  startp,
size_t  endp,
bezier spl,
uint32_t  eflag 
)

Definition at line 284 of file arrows.c.

References inside_t::a, arrow_length(), bezier_clip(), DIST2, bezier::eflag, bezier::ep, inside(), inside_t::p, ps, and inside_t::r.

Referenced by arrow_clip(), and makeCompoundEdge().

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

◆ arrowOrthoClip()

void arrowOrthoClip ( edge_t e,
pointf ps,
size_t  startp,
size_t  endp,
bezier spl,
uint32_t  sflag,
uint32_t  eflag 
)

Definition at line 355 of file arrows.c.

References arrow_length(), DIST, bezier::eflag, bezier::ep, ps, bezier::sflag, bezier::sp, pointf_s::x, and pointf_s::y.

Referenced by arrow_clip().

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

◆ arrowStartClip()

size_t arrowStartClip ( edge_t e,
pointf ps,
size_t  startp,
size_t  endp,
bezier spl,
uint32_t  sflag 
)

Definition at line 315 of file arrows.c.

References inside_t::a, arrow_length(), bezier_clip(), DIST2, inside(), inside_t::p, ps, inside_t::r, bezier::sflag, and bezier::sp.

Referenced by arrow_clip(), and makeCompoundEdge().

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

◆ beginpath()

void beginpath ( path P,
Agedge_t e,
int  et,
pathend_t endp,
bool  merge 
)

Definition at line 389 of file splines.c.

References add_pointf(), aghead, agraphof(), agtail, BOTTOM, pathend_t::boxes, pathend_t::boxn, conc_slope(), port::constrained, path::data, ED_edge_type, ED_head_port, ED_tail_port, ED_to_orig, FLATEDGE, FUDGE, GD_ranksep, HT2, LEFT, boxf::LL, MAX, merge(), MIN, pathend_t::nb, path::nbox, ND_coord, ND_lw, ND_node_type, ND_rw, ND_shape, NORMAL, pathend_t::np, NULL, port::p, REGULAREDGE, resolvePort(), RIGHT, SELFEDGE, pathend_t::sidemask, path::start, port::theta, TOP, boxf::UR, pointf_s::x, and pointf_s::y.

Referenced by make_regular_edge(), makeBottomFlatEnd(), and makeFlatEnd().

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

◆ bezier_clip()

void bezier_clip ( inside_t inside_context,
bool(*)(inside_t *inside_context, pointf p)  insidefn,
pointf sp,
bool  left_inside 
)

Definition at line 106 of file splines.c.

References Bezier(), inside(), left, NULL, right, pointf_s::x, and pointf_s::y.

Referenced by arrowEndClip(), arrowStartClip(), compassPoint(), and shape_clip0().

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

◆ bind_shape()

shape_desc * bind_shape ( char *  name,
node_t np 
)

Definition at line 3994 of file shapes.c.

References agget(), shape_desc::name, NULL, safefile(), Shapes, str, streq(), and user_shape().

Referenced by common_init_node().

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

◆ charsetToStr()

char * charsetToStr ( int  c)

Definition at line 806 of file input.c.

References agerrorf(), CHAR_BIG5, CHAR_LATIN1, and CHAR_UTF8.

Referenced by initHTMLlexer().

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

◆ clip_and_install()

void clip_and_install ( edge_t fe,
node_t hn,
pointf ps,
size_t  pn,
splineInfo info 
)

Definition at line 238 of file splines.c.

References agraphof(), agtail, APPROXEQPT, arrow_clip(), ED_edge_type, ED_head_port, ED_tail_port, ED_to_orig, GD_bb, bezier::list, MILLIPOINT, inside_t::n, ND_coord, ND_order, ND_rank, ND_shape, new_spline(), NORMAL, NULL, ps, inside_t::s, shape_clip0(), bezier::size, update_bb_bz(), pointf_s::x, and pointf_s::y.

Referenced by attachOrthoEdges(), finishEdge(), make_flat_bottom_edges(), make_flat_edge(), make_flat_labeled_edge(), make_regular_edge(), makePolyline(), makeSimpleFlat(), makeSimpleFlatLabels(), makeSpline(), makeStraightEdges(), selfBottom(), selfLeft(), selfRight(), and selfTop().

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

◆ coord()

pointf coord ( node_t n)

Definition at line 150 of file utils.c.

References ND_pos, POINTS_PER_INCH, pointf_s::x, and pointf_s::y.

Referenced by average_edge_length(), compute_bb(), emit_begin_node(), fillEdge(), gen_fields(), genPoly(), node_data_new(), QuadTree_add(), QuadTree_add_internal(), QuadTree_get_nearest_internal(), QuadTree_get_quadrant(), QuadTree_get_supernodes_internal(), QuadTree_new_from_point_list(), QuadTree_print_internal(), and right_of().

Here is the caller graph for this function:

◆ do_graph_label()

void do_graph_label ( graph_t sg)

Definition at line 829 of file input.c.

References agfindgraphattr, agget(), aghtmlstr(), agroot(), BOTTOM_IX, DEFAULT_COLOR, DEFAULT_FONTNAME, DEFAULT_FONTSIZE, GD_border, GD_flip, GD_has_labels, GD_label, GD_label_pos, GRAPH_LABEL, LABEL_AT_BOTTOM, LABEL_AT_LEFT, LABEL_AT_RIGHT, LABEL_AT_TOP, late_double(), late_nnstring(), LEFT_IX, LT_HTML, LT_NONE, make_label(), MIN_FONTSIZE, PAD, RIGHT_IX, Agraph_s::root, str, TOP_IX, pointf_s::x, and pointf_s::y.

Referenced by add_cluster(), deriveGraph(), graph_init(), make_new_cluster(), and mkClusters().

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

◆ dotneato_args_initialize()

int dotneato_args_initialize ( GVC_t gvc,
int  argc,
char **  argv 
)

Definition at line 218 of file input.c.

References agattr(), AGEDGE, AGERR, agerrorf(), AGMAX, AGNODE, AGRAPH, agseterr(), GVCOMMON_s::auto_outfile_names, GVCOMMON_s::cmdname, GVC_s::common, GVCOMMON_s::config, dotneato_basename(), dotneato_usage(), free(), getFlagOpt(), global_def(), graphviz_exit(), gv_calloc(), gv_strdup(), gvc, gvconfig(), GvExitOnUsage, Gvfilepath, gvjobs_output_filename(), gvjobs_output_langname(), gvlayout_select(), gvplugin_graph(), gvplugin_list(), HTTPServerEnVar, GVCOMMON_s::info, GVC_s::input_filenames, is_exactly_zero(), GVC_s::jobs, layout(), NO_SUPPORT, NODENAME_ESC, NULL, GVJ_s::output_langname, P_graph, POINTS_PER_INCH, PSinputscale, Reduce, startswith(), streq(), use_library(), Verbose, GVCOMMON_s::verbose, and Y_invert.

Referenced by gvParseArgs().

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

◆ dotneato_postprocess()

void dotneato_postprocess ( Agraph_t g)

Definition at line 689 of file postproc.c.

References gv_postprocess().

Referenced by circo_layout(), dot_layout(), main(), make_flat_adj_edges(), osage_layout(), pack_graph(), patchwork_layout(), sfdp_layout(), and twopi_layout().

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

◆ dotneato_usage()

int dotneato_usage ( const char *  argv0,
int  exval 
)

Definition at line 78 of file input.c.

References configFlags, configItems, fdpFlags, fdpItems, genericItems, graphviz_exit(), GvExitOnUsage, neatoFlags, neatoItems, and usageFmt.

Referenced by dotneato_args_initialize(), fdp_extra_args(), and neato_extra_args().

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

◆ edgeMidpoint()

pointf edgeMidpoint ( graph_t g,
edge_t e 
)

Definition at line 1299 of file splines.c.

References APPROXEQPT, dotneato_closest(), ED_spl, EDGE_TYPE, EDGETYPE_CURVED, EDGETYPE_SPLINE, endPoints(), MILLIPOINT, polylineMidpoint(), pointf_s::x, and pointf_s::y.

Referenced by addXLabels().

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

◆ ellipticWedge()

Ppolyline_t * ellipticWedge ( pointf  ctr,
double  major,
double  minor,
double  angle0,
double  angle1 
)

Definition at line 298 of file ellipse.c.

References genEllipticPath(), initEllipse(), pointf_s::x, and pointf_s::y.

Referenced by wedgedEllipse().

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

◆ emit_clusters()

void emit_clusters ( GVJ_t job,
Agraph_t g,
int  flags 
)

Definition at line 3467 of file emit.c.

References ag_xget, agerr(), agfstnode(), agfstout(), agget(), agnameof(), agnxtnode(), agnxtout(), AGPREV, checkClusterStyle(), clust_in_layer(), color(), DEFAULT_ACTIVEFILLCOLOR, DEFAULT_ACTIVEPENCOLOR, DEFAULT_COLOR, DEFAULT_DELETEDFILLCOLOR, DEFAULT_DELETEDPENCOLOR, DEFAULT_FILL, DEFAULT_SELECTEDFILLCOLOR, DEFAULT_SELECTEDPENCOLOR, DEFAULT_VISITEDFILLCOLOR, DEFAULT_VISITEDPENCOLOR, emit_begin_cluster(), EMIT_CLABEL, emit_clusters(), EMIT_CLUSTERS_LAST, emit_edge(), emit_end_cluster(), emit_label(), emit_map_rect(), emit_node(), EMIT_PREORDER, obj_state_s::explicit_tooltip, FILL, graphviz_polygon_style_t::filled, findStopColor(), flags, free(), G_gradientangle, G_penwidth, G_peripheries, GD_bb, GD_clust, GD_gui_state, GD_label, GD_n_cluster, GRADIENT, GUI_STATE_ACTIVE, GUI_STATE_DELETED, GUI_STATE_SELECTED, GUI_STATE_VISITED, gvrender_begin_anchor(), gvrender_box(), gvrender_end_anchor(), gvrender_set_fillcolor(), gvrender_set_gradient_vals(), gvrender_set_pencolor(), gvrender_set_penwidth(), gvrender_set_style(), obj_state_s::id, late_double(), late_int(), GVJ_s::obj, penwidth, graphviz_polygon_style_t::radial, RGRADIENT, round_corners(), graphviz_polygon_style_t::rounded, setColorScheme(), graphviz_polygon_style_t::striped, stripedBox(), obj_state_s::target, obj_state_s::tooltip, obj_state_s::url, pointf_s::x, and pointf_s::y.

Referenced by emit_clusters(), and emit_view().

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

◆ emit_graph()

void emit_graph ( GVJ_t job,
graph_t g 
)

Definition at line 3371 of file emit.c.

◆ emit_label()

void emit_label ( GVJ_t job,
emit_state_t  emit_state,
textlabel_t lp 
)

Definition at line 212 of file labels.c.

References textlabel_t::dimen, emit_html_label(), obj_state_s::emit_state, textlabel_t::fontcolor, textlabel_t::fontsize, gvrender_begin_label(), gvrender_end_label(), gvrender_set_pencolor(), gvrender_textspan(), textlabel_t::html, textspan_t::just, LABEL_PLAIN, obj_state_s::labeledgealigned, textlabel_t::nspans, GVJ_s::obj, textlabel_t::pos, textspan_t::size, textlabel_t::space, textlabel_t::span, textlabel_t::txt, textlabel_t::u, textlabel_t::valign, pointf_s::x, and pointf_s::y.

Referenced by emit_clusters(), emit_edge_label(), emit_node(), emit_page(), epsf_gencode(), gen_fields(), and poly_gencode().

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

◆ emit_map_rect()

void emit_map_rect ( GVJ_t job,
boxf  b 
)

Definition at line 634 of file emit.c.

References flags, GVJ_s::flags, free(), gv_calloc(), GVRENDER_DOES_MAP_RECTANGLE, GVRENDER_DOES_MAPS, GVRENDER_DOES_TOOLTIPS, GVRENDER_DOES_TRANSFORM, gvrender_ptf_A(), boxf::LL, MAP_POLYGON, MAP_RECTANGLE, GVJ_s::obj, rect2poly(), boxf::UR, obj_state_s::url_map_n, obj_state_s::url_map_p, and obj_state_s::url_map_shape.

Referenced by emit_clusters(), emit_page(), and initAnchor().

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

◆ emit_once()

bool emit_once ( char *  message)

Definition at line 3430 of file emit.c.

References dtinsert, dtopen(), Dtoset, dtsearch, gv_strdup(), str, stringdict, and strings.

Referenced by get_metrics_for_font_family(), gvrender_resolve_color(), and textspan_size().

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

◆ emit_once_reset()

void emit_once_reset ( void  )

Definition at line 3440 of file emit.c.

References dtclose(), and strings.

Referenced by gvFreeContext().

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

◆ endpath()

void endpath ( path P,
Agedge_t e,
int  et,
pathend_t endp,
bool  merge 
)

Definition at line 586 of file splines.c.

References add_pointf(), aghead, agraphof(), agtail, BOTTOM, pathend_t::boxes, pathend_t::boxn, conc_slope(), port::constrained, ED_edge_type, ED_head_port, ED_tail_port, ED_to_orig, path::end, FLATEDGE, FUDGE, GD_ranksep, HT2, LEFT, boxf::LL, M_PI, MAX, merge(), MIN, pathend_t::nb, ND_coord, ND_lw, ND_node_type, ND_rw, ND_shape, NORMAL, pathend_t::np, NULL, port::p, REGULAREDGE, resolvePort(), RIGHT, SELFEDGE, pathend_t::sidemask, path::start, port::theta, TOP, boxf::UR, pointf_s::x, and pointf_s::y.

Referenced by make_regular_edge(), makeBottomFlatEnd(), and makeFlatEnd().

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

◆ epsf_free()

void epsf_free ( node_t n)

Definition at line 118 of file psusershape.c.

References free(), and ND_shape_info.

Here is the call graph for this function:

◆ epsf_init()

void epsf_init ( node_t n)

Definition at line 97 of file psusershape.c.

References agget(), agnameof(), agwarningf(), dx, dy, gv_alloc(), usershape_s::h, epsf_s::macro_id, usershape_s::macro_id, ND_height, ND_shape_info, ND_width, epsf_s::offset, PS2INCH, safefile(), str, user_init(), usershape_s::w, pointf_s::x, usershape_s::x, pointf_s::y, and usershape_s::y.

Referenced by shapeOf().

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

◆ find_user_shape()

shape_desc * find_user_shape ( const char *  name)

Definition at line 3962 of file shapes.c.

References N_UserShape, NULL, streq(), and UserShape.

Referenced by gvrender_usershape().

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

◆ free_label()

void free_label ( textlabel_t p)

Definition at line 199 of file labels.c.

References free(), free_html_label(), free_textspan(), textlabel_t::html, textlabel_t::nspans, textlabel_t::span, textlabel_t::text, textlabel_t::txt, and textlabel_t::u.

Referenced by cleanup_graphs(), cleanup_subgs(), dot_cleanup_graph(), dot_cleanup_node(), free_field(), freeEdgeInfo(), graph_cleanup(), gv_cleanup_edge(), and gv_cleanup_node().

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

◆ free_textspan()

void free_textspan ( textspan_t tl,
size_t  cnt 
)

Definition at line 186 of file labels.c.

References cnt(), free(), textspan_t::free_layout, textspan_t::layout, and textspan_t::str.

Referenced by free_label(), and freePara().

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

◆ getdouble()

void getdouble ( graph_t g,
char *  name,
double *  result 
)

Definition at line 490 of file input.c.

References agget().

Referenced by scan_graph_mode().

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

◆ getObjId()

char * getObjId ( GVJ_t job,
void *  obj,
agxbuf xb 
)

Definition at line 201 of file emit.c.

References AGEDGE, agget(), AGNODE, agobjkind(), AGRAPH, AGSEQ, agxbprint(), agxbput(), agxbuse(), GVC_s::g, GD_drawing, GVJ_s::gvc, id, layerPagePrefix(), and NULL.

Referenced by emit_begin_edge(), initAnchor(), and initObjMapData().

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

◆ getsplinepoints()

splines * getsplinepoints ( edge_t e)

Definition at line 1392 of file splines.c.

References agerrorf(), aghead, agnameof(), agtail, ED_edge_type, ED_spl, ED_to_orig, le, NORMAL, and NULL.

Referenced by completeregularpath(), edgeHeadpoint(), edgeTailpoint(), and place_portlabel().

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

◆ graph_cleanup()

void graph_cleanup ( graph_t g)

Definition at line 790 of file input.c.

◆ graph_init()

void graph_init ( graph_t g,
bool  use_rankdir 
)

Definition at line 592 of file input.c.

◆ gv_cleanup_edge()

void gv_cleanup_edge ( Agedge_t e)

Definition at line 1524 of file utils.c.

References agdelrec(), ED_head_label, ED_label, ED_path, ED_tail_label, ED_xlabel, free(), free_label(), gv_free_splines(), and ps.

Referenced by circo_cleanup(), dot_cleanup(), fdp_cleanup(), neato_cleanup(), osage_cleanup(), patchwork_cleanup(), sfdp_cleanup(), twopi_cleanup(), and undoCompound().

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

◆ gv_cleanup_node()

void gv_cleanup_node ( Agnode_t n)

Definition at line 1536 of file utils.c.

References agdelrec(), free(), free_label(), ND_label, ND_pos, ND_shape, and ND_xlabel.

Referenced by circo_cleanup(), fdp_cleanup(), neato_cleanup(), osage_cleanup(), patchwork_cleanup(), sfdp_cleanup(), twopi_cleanup(), and undoClusterEdges().

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

◆ gv_fixLocale()

void gv_fixLocale ( int  set)

Definition at line 3869 of file emit.c.

◆ gv_free_splines()

void gv_free_splines ( edge_t e)

Definition at line 1514 of file utils.c.

References ED_spl, free(), and NULL.

Referenced by freeEdgeInfo(), gv_cleanup_edge(), and user_spline().

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

◆ gv_postprocess()

void gv_postprocess ( Agraph_t g,
int  allowTranslation 
)

Definition at line 597 of file postproc.c.

References addXLabels(), agxbdisown(), agxbprint(), Flip, GD_bb, GD_flip, GD_label, GD_label_pos, GD_rankdir, LABEL_AT_TOP, M1, M2, Offset, PAD, place_flip_graph_label(), place_graph_label(), place_root_label(), Rankdir, RANKDIR_BT, RANKDIR_LR, RANKDIR_RL, RANKDIR_TB, Show_boxes, translate_drawing(), UNREACHABLE, pointf_s::x, and pointf_s::y.

Referenced by dotneato_postprocess(), fdp_layout(), and neato_layout().

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

◆ init_xdot()

void * init_xdot ( Agraph_t g)

Definition at line 58 of file emit.c.

References agerr(), agget(), agnameof(), AGPREV, agwarningf(), xdot_stats::cnt, elapsed_sec(), xdot_stats::n_bezier, xdot_stats::n_bezier_pts, xdot_stats::n_ellipse, xdot_stats::n_polygon, xdot_stats::n_polygon_pts, xdot_stats::n_polyline, xdot_stats::n_polyline_pts, xdot_stats::n_text, NULL, parseXDotF(), start_timer(), statXDot(), Verbose, and xd.

Referenced by graph_init().

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

◆ initMapData()

int initMapData ( GVJ_t job,
char *  lbl,
char *  url,
char *  tooltip,
char *  target,
char *  id,
void *  gobj 
)

Definition at line 154 of file emit.c.

References obj_state_s::explicit_tooltip, flags, GVJ_s::flags, gv_strdup(), GVRENDER_DOES_LABELS, GVRENDER_DOES_MAPS, GVRENDER_DOES_TARGETS, GVRENDER_DOES_TOOLTIPS, obj_state_s::id, obj_state_s::label, GVJ_s::obj, strdup_and_subst_obj(), obj_state_s::target, obj_state_s::tooltip, and obj_state_s::url.

Referenced by initAnchor(), and initObjMapData().

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

◆ isPolygon()

bool isPolygon ( node_t n)

Definition at line 1926 of file shapes.c.

References ND_shape, and poly_init().

Referenced by attach_attrs_and_arrows().

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

◆ make_label()

textlabel_t * make_label ( void *  obj,
char *  str,
int  kind,
double  fontsize,
char *  fontname,
char *  fontcolor 
)

Definition at line 108 of file labels.c.

References AGEDGE, agerr(), aghead, agisdirected(), agnameof(), AGNODE, agobjkind(), AGPREV, AGRAPH, agraphof(), agroot(), agtail, CHAR_LATIN1, textlabel_t::charset, textlabel_t::fontcolor, textlabel_t::fontname, textlabel_t::fontsize, free(), GD_charset, GD_gvc, gv_alloc(), gv_strdup(), textlabel_t::html, htmlEntityUTF8(), latin1ToUTF8(), LT_HTML, LT_NONE, LT_RECD, make_html_label(), make_simple_label(), NULL, Agraph_s::root, str, strdup_and_subst_obj0(), and textlabel_t::text.

Referenced by common_init_edge(), common_init_node(), do_graph_label(), and parse_reclbl().

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

◆ make_simple_label()

void make_simple_label ( GVC_t gvc,
textlabel_t rv 
)

Definition at line 54 of file labels.c.

References agxbdisown(), agxbfree(), agxblen(), agxbputc(), CHAR_BIG5, textlabel_t::charset, textlabel_t::dimen, gvc, textlabel_t::space, storeline(), textlabel_t::text, pointf_s::x, and pointf_s::y.

Referenced by make_html_label(), and make_label().

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

◆ makePortLabels()

void makePortLabels ( edge_t e)

Definition at line 1217 of file splines.c.

References agraphof(), agtail, E_labelangle, E_labeldistance, ED_head_label, ED_tail_label, place_portlabel(), and updateBB().

Referenced by addEdgeLabels(), and makeSelfArcs().

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

◆ makeSelfEdge()

void makeSelfEdge ( edge_t edges[],
size_t  ind,
size_t  cnt,
double  sizex,
double  sizey,
splineInfo sinfo 
)

Definition at line 1174 of file splines.c.

References BOTTOM, cnt(), ED_head_port, ED_tail_port, LEFT, RIGHT, selfBottom(), selfLeft(), selfRight(), selfTop(), sinfo, and TOP.

Referenced by dot_splines_(), and makeSelfArcs().

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

◆ makeStraightEdge()

void makeStraightEdge ( graph_t g,
edge_t e,
int  edgetype,
splineInfo info 
)

Definition at line 934 of file routespl.c.

References ED_to_virt, free(), gv_calloc(), makeStraightEdges(), and sinfo.

Referenced by genroute(), and spline_edges_().

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

◆ makeStraightEdges()

void makeStraightEdges ( graph_t g,
edge_t **  edges,
size_t  e_cnt,
int  et,
splineInfo sinfo 
)

Definition at line 953 of file routespl.c.

References add_pointf(), addEdgeLabels(), aghead, agtail, APPROXEQPT, clip_and_install(), Concentrate, del(), dx, ED_head_port, ED_tail_port, EDGETYPE_CURVED, EDGETYPE_PLINE, GD_nodesep, get_cycle_centroid(), head, make_polyline(), MILLIPOINT, ND_coord, perp(), Ppoly_t::pn, Ppoly_t::ps, Agraph_s::root, sinfo, pointf_s::x, and pointf_s::y.

Referenced by dot_splines_(), and makeStraightEdge().

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

◆ new_spline()

bezier * new_spline ( edge_t e,
size_t  sz 
)

Definition at line 215 of file splines.c.

References ED_edge_type, ED_spl, ED_to_orig, bezier::eflag, bezier::ep, gv_alloc(), gv_calloc(), gv_recalloc(), bezier::list, NORMAL, NULL, bezier::sflag, bezier::size, bezier::sp, pointf_s::x, and pointf_s::y.

Referenced by clip_and_install(), make_flat_adj_edges(), and user_spline().

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

◆ parse_style()

char ** parse_style ( char *  s)

Definition at line 3702 of file emit.c.

References agerrorf(), agwarningf(), agxblen(), agxbput_n(), agxbputc(), agxbuse(), FUNLIMIT, NULL, token_t::size, token_t::start, style_token(), and token_t::type.

Referenced by checkClusterStyle(), checkStyle(), emit_edge(), emit_node(), emit_xdot(), and isFilled().

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

◆ place_graph_label()

void place_graph_label ( Agraph_t g)

Definition at line 732 of file postproc.c.

References agroot(), BOTTOM_IX, GD_bb, GD_border, GD_clust, GD_label, GD_label_pos, GD_n_cluster, LABEL_AT_LEFT, LABEL_AT_RIGHT, LABEL_AT_TOP, place_graph_label(), TOP_IX, pointf_s::x, and pointf_s::y.

Referenced by gv_postprocess(), and place_graph_label().

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

◆ place_portlabel()

int place_portlabel ( edge_t e,
bool  head_p 
)

Definition at line 1340 of file splines.c.

References AGXGET, Bezier(), dist(), E_labelangle, E_labeldistance, ED_edge_type, ED_head_label, ED_tail_label, bezier::eflag, bezier::ep, getsplinepoints(), IGNORED, late_double(), bezier::list, splines::list, NULL, PORT_LABEL_ANGLE, PORT_LABEL_DISTANCE, textlabel_t::pos, RADIANS, textlabel_t::set, bezier::sflag, bezier::size, splines::size, bezier::sp, pointf_s::x, and pointf_s::y.

Referenced by dot_splines_(), and makePortLabels().

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

◆ pop_obj_state()

void pop_obj_state ( GVJ_t job)

Definition at line 122 of file emit.c.

References free(), obj_state_s::headtarget, obj_state_s::headtooltip, obj_state_s::headurl, obj_state_s::id, obj_state_s::labeltarget, obj_state_s::labeltooltip, obj_state_s::labelurl, GVJ_s::obj, obj_state_s::parent, obj_state_s::tailtarget, obj_state_s::tailtooltip, obj_state_s::tailurl, obj_state_s::target, obj_state_s::tooltip, obj_state_s::url, obj_state_s::url_bsplinemap_n, obj_state_s::url_bsplinemap_p, and obj_state_s::url_map_p.

Referenced by emit_end_cluster(), emit_end_edge(), emit_end_graph(), emit_end_node(), and freeObj().

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

◆ push_obj_state()

obj_state_t * push_obj_state ( GVJ_t job)

Definition at line 98 of file emit.c.

References obj_state_s::fill, FILL_NONE, obj_state_s::fillcolor, obj_state_s::gradient_angle, gv_alloc(), GVJ_s::obj, obj_state_s::parent, parent, obj_state_s::pen, PEN_SOLID, obj_state_s::pencolor, obj_state_s::penwidth, PENWIDTH_NORMAL, and obj_state_s::stopcolor.

Referenced by allocObj(), emit_begin_cluster(), emit_begin_edge(), emit_begin_graph(), and emit_begin_node().

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

◆ rank()

int rank ( graph_t g,
int  balance,
int  maxiter 
)

Definition at line 1001 of file ns.c.

References agget(), rank2(), and SEARCHSIZE.

Referenced by adjustRanks(), adjustSimple(), checkFlatAdjacent(), clust_ht(), constrainX(), constrainY(), dot_position(), flat_limits(), make_LR_constraints(), neighbor(), rank1(), set_xcoords(), and set_ycoords().

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

◆ rank2()

int rank2 ( graph_t g,
int  balance,
int  maxiter,
int  search_size 
)

Definition at line 923 of file ns.c.

References elapsed_sec(), enter_edge(), err, feasible_tree(), freeTreeList(), G, graphSize(), init_graph(), init_rank(), leave_edge(), LR_balance(), N_edges, N_nodes, PRISIZE_T, reset_lists(), scan_and_normalize(), Search_size, SEARCHSIZE, start_timer(), TB_balance(), update(), and Verbose.

Referenced by dot2_rank(), and rank().

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

◆ resolvePort()

port resolvePort ( node_t n,
node_t other,
port oldport 
)

Definition at line 4346 of file shapes.c.

References port::bp, closestSide(), compassPort(), port::name, NULL, and port::side.

Referenced by beginpath(), endpath(), and resolvePorts().

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

◆ resolvePorts()

void resolvePorts ( edge_t e)

Definition at line 4358 of file shapes.c.

References aghead, agtail, ED_head_port, ED_tail_port, and resolvePort().

Referenced by splineEdges().

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

◆ round_corners()

void round_corners ( GVJ_t job,
pointf AF,
size_t  sides,
graphviz_polygon_style_t  style,
int  filled 
)

Any drawing done here should assume fillcolors, pencolors, etc. have been set by the calling routine. Normally, the drawing should consist of a region, filled or unfilled, followed by additional line segments. A single fill is necessary for gradient colors to work.

Definition at line 707 of file shapes.c.

References alloc_interpolation_points(), ASSEMBLY, B, BOX3D, C, CDS, COMPONENT, CYLINDER, cylinder_draw(), D, graphviz_polygon_style_t::diagonals, diagonals_draw(), DOGEAR, FIVEPOVERHANG, FOLDER, free(), gv_calloc(), gvrender_polygon(), gvrender_polyline(), INSULATOR, LARROW, LPROMOTER, mid_x(), mid_y(), NOVERHANG, NULL, PRIMERSITE, PROMOTER, PROTEASESITE, PROTEINSTAB, RARROW, RESTRICTIONSITE, RIBOSITE, RNASTAB, graphviz_polygon_style_t::rounded, rounded_draw(), RPROMOTER, graphviz_polygon_style_t::shape, SIGNATURE, TAB, TERMINATOR, THREEPOVERHANG, UNREACHABLE, UTR, pointf_s::x, and pointf_s::y.

Referenced by doBorder(), emit_clusters(), emit_html_cell(), emit_html_tbl(), poly_gencode(), and record_gencode().

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

◆ routepolylines()

pointf * routepolylines ( path pp,
size_t *  npoints 
)

Definition at line 570 of file routespl.c.

References routesplines_().

Referenced by make_flat_bottom_edges(), make_flat_edge(), make_flat_labeled_edge(), and make_regular_edge().

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

◆ routesplines()

pointf * routesplines ( path pp,
size_t *  npoints 
)

Definition at line 566 of file routespl.c.

References routesplines_().

Referenced by make_flat_bottom_edges(), make_flat_edge(), make_flat_labeled_edge(), and make_regular_edge().

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

◆ routesplinesinit()

int routesplinesinit ( void  )

Data initialized once until matching call to routeplineterm Allows recursive calls to dot

Definition at line 220 of file routespl.c.

References nboxes, nedges, routeinit, Show_boxes, start_timer(), and Verbose.

Referenced by dot_splines_().

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

◆ routesplinesterm()

void routesplinesterm ( void  )

Definition at line 233 of file routespl.c.

References elapsed_sec(), nboxes, nedges, PRISIZE_T, routeinit, and Verbose.

Referenced by dot_splines_().

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

◆ selfRightSpace()

double selfRightSpace ( edge_t e)

Definition at line 1148 of file splines.c.

References aghead, agraphof(), BOTTOM, textlabel_t::dimen, ED_head_port, ED_label, ED_tail_port, GD_flip, LEFT, SELF_EDGE_SIZE, TOP, pointf_s::x, and pointf_s::y.

Referenced by make_LR_constraints().

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

◆ shape_clip()

void shape_clip ( node_t n,
pointf  curve[4] 
)

Definition at line 194 of file splines.c.

References inside_t::n, ND_coord, ND_rw, ND_shape, NULL, inside_t::s, shape_clip0(), pointf_s::x, and pointf_s::y.

Referenced by sameport().

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

◆ shapeOf()

shape_kind shapeOf ( node_t n)

Definition at line 1906 of file shapes.c.

References epsf_init(), ND_shape, point_init(), poly_init(), record_init(), SH_EPSF, SH_POINT, SH_POLY, SH_RECORD, and SH_UNSET.

Referenced by cloneNode(), common_init_node(), emit_begin_node(), make_flat_adj_edges(), makeAddPoly(), makeObstacle(), and makePoly().

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

◆ simpleSplineRoute()

pointf * simpleSplineRoute ( pointf  tp,
pointf  hp,
Ppoly_t  poly,
size_t *  n_spl_pts,
int  polyline 
)

Definition at line 173 of file routespl.c.

References Pedge_t::a, agerrorf(), Pedge_t::b, free(), gv_calloc(), make_polyline(), NULL, Ppoly_t::pn, Proutespline(), ps, Ppoly_t::ps, Pshortestpath(), pointf_s::x, Pxy_t::x, pointf_s::y, and Pxy_t::y.

Referenced by makeSimpleFlatLabels().

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

◆ stripedBox()

int stripedBox ( GVJ_t job,
pointf AF,
const char *  clrs,
int  rotate 
)

Definition at line 589 of file emit.c.

References FILL, gvrender_polygon(), gvrender_set_fillcolor(), gvrender_set_penwidth(), NULL, GVJ_s::obj, parseSegs(), obj_state_s::penwidth, rotate(), THIN_LINE, and pointf_s::x.

Referenced by emit_clusters(), and poly_gencode().

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

◆ taper()

stroke_t taper ( bezier bez,
double(*)(double, double, double)  radfunc_t,
double  initwid 
)

Definition at line 181 of file taper.c.

References pathpoint::bevel, currentmiterlimit, D2R, pathpoint::dir, pathpoint::dir2, dist(), drawbevel(), free(), pathpoint::lengthsofar, lineto, pathpoint::lout, moveto, myatan(), mymod(), pathtolines(), SIZE_MAX, pathpoint::type, pathpoint::x, and pathpoint::y.

Referenced by emit_edge_graphics().

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

◆ textfont_dict_close()

void textfont_dict_close ( GVC_t gvc)

Definition at line 165 of file textspan.c.

References dtclose(), gvc, and GVC_s::textfont_dt.

Here is the call graph for this function:

◆ textfont_dict_open()

void textfont_dict_open ( GVC_t gvc)

Definition at line 160 of file textspan.c.

References DTDISC, dtopen(), Dtoset, gvc, textfont_comparf(), GVC_s::textfont_disc, GVC_s::textfont_dt, textfont_freef(), and textfont_makef().

Here is the call graph for this function:

◆ textspan_size()

pointf textspan_size ( GVC_t gvc,
textspan_t span 
)

Definition at line 79 of file textspan.c.

References emit_once(), estimate_textspan_size(), font, textspan_t::font, gvc, gvtextlayout(), NULL, textspan_t::size, translate_postscript_fontname(), and Verbose.

Referenced by size_html_txt(), storeline(), and xdotBB().

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

◆ translate_bb()

void translate_bb ( Agraph_t g,
int  rankdir 
)

Definition at line 123 of file postproc.c.

References GD_bb, GD_clust, GD_label, GD_n_cluster, boxf::LL, map_point(), RANKDIR_BT, RANKDIR_LR, translate_bb(), boxf::UR, pointf_s::x, and pointf_s::y.

Referenced by translate_bb(), and translate_drawing().

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

◆ update_bb_bz()

void update_bb_bz ( boxf bb,
pointf cp 
)

Definition at line 748 of file emit.c.

References Bezier(), check_control_points(), left, boxf::LL, right, update_bb_bz(), boxf::UR, pointf_s::x, and pointf_s::y.

Referenced by clip_and_install(), make_flat_adj_edges(), and update_bb_bz().

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

◆ wedgedEllipse()

int wedgedEllipse ( GVJ_t job,
pointf pf,
const char *  clrs 
)

Definition at line 543 of file emit.c.

References ellipticWedge(), freePath(), gvrender_beziercurve(), gvrender_set_fillcolor(), gvrender_set_penwidth(), M_PI, mid_pointf(), NULL, GVJ_s::obj, parseSegs(), obj_state_s::penwidth, Ppoly_t::pn, Ppoly_t::ps, sub_pointf(), THIN_LINE, pointf_s::x, and pointf_s::y.

Referenced by poly_gencode().

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

◆ xdotBB()