Graphviz 13.0.0~dev.20250607.1528
Loading...
Searching...
No Matches
emit.c File Reference

graphics code generator More...

#include "config.h"
#include <assert.h>
#include <float.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#include <locale.h>
#include <math.h>
#include <common/geomprocs.h>
#include <common/render.h>
#include <common/htmltable.h>
#include <gvc/gvc.h>
#include <cdt/cdt.h>
#include <pathplan/pathgeom.h>
#include <util/agxbuf.h>
#include <util/alloc.h>
#include <util/gv_ctype.h>
#include <util/gv_math.h>
#include <util/list.h>
#include <util/streq.h>
#include <util/strview.h>
#include <util/tokenize.h>
#include <util/unreachable.h>
#include <util/unused.h>
#include <xdot/xdot.h>
Include dependency graph for emit.c:

Go to the source code of this file.

Data Structures

struct  exdot_op
 
struct  colorseg_t
 
struct  segitem_s
 
struct  token_t
 

Macros

#define P2RECT(p, pr, sx, sy)   (pr[0].x = p.x - sx, pr[0].y = p.y - sy, pr[1].x = p.x + sx, pr[1].y = p.y + sy)
 
#define FUZZ   3
 
#define EPSILON   .0001
 
#define EPS   1E-5
 
#define AEQ0(x)   (((x) < EPS) && ((x) > -EPS))
 
#define THIN_LINE   0.5
 
#define HW   2.0 /* maximum distance away from line, in points */
 
#define MARK_FIRST_SEG(L)   ((L)->next = (segitem_t*)1)
 
#define FIRST_SEG(L)   ((L)->next == (segitem_t*)1)
 
#define INIT_SEG(P, L)   {(L)->next = 0; (L)->p = P;}
 
#define SEP   2.0
 
#define NotFirstPage(j)   (((j)->layerNum>1)||((j)->pagesArrayElem.x > 0)||((j)->pagesArrayElem.x > 0))
 
#define SID   1
 
#define FUNLIMIT   64
 
#define FINISH()   if (Verbose) fprintf(stderr,"gvRenderJobs %s: %.2f secs.\n", agnameof(g), elapsed_sec())
 

Typedefs

typedef struct segitem_s segitem_t
 
typedef double(* radfunc_t) (double, double, double)
 

Functions

void * init_xdot (Agraph_t *g)
 
obj_state_tpush_obj_state (GVJ_t *job)
 
void pop_obj_state (GVJ_t *job)
 
bool initMapData (GVJ_t *job, char *lbl, char *url, char *tooltip, char *target, char *id, void *gobj)
 
static void layerPagePrefix (GVJ_t *job, agxbuf *xb)
 
char * getObjId (GVJ_t *job, void *obj, agxbuf *xb)
 Use id of root graph if any, plus kind and internal id of object.
 
static char * interpretCRNL (char *ins)
 
static char * preprocessTooltip (char *s, void *gobj)
 
static void initObjMapData (GVJ_t *job, textlabel_t *lab, void *gobj)
 
static void map_point (GVJ_t *job, pointf pf)
 
static char ** checkClusterStyle (graph_t *sg, graphviz_polygon_style_t *flagp)
 
static void freeSeg (colorseg_t seg)
 
static double getSegLen (strview_t *s)
 
static int parseSegs (const char *clrs, colorsegs_t *psegs)
 
int wedgedEllipse (GVJ_t *job, pointf *pf, const char *clrs)
 
int stripedBox (GVJ_t *job, pointf *AF, const char *clrs, int rotate)
 
void emit_map_rect (GVJ_t *job, boxf b)
 
static void map_label (GVJ_t *job, textlabel_t *lab)
 
static bool isRect (polygon_t *p)
 
static bool isFilled (node_t *n)
 
static pointfpEllipse (double a, double b, size_t np)
 
static bool check_control_points (pointf *cp)
 
void update_bb_bz (boxf *bb, pointf *cp)
 
static UNUSED void psmapOutput (const points_t *ps, size_t start, size_t n)
 
static segitem_tappendSeg (pointf p, segitem_t *lp)
 
static void map_bspline_poly (points_t *pbs_p, pbs_size_t *pbs_n, size_t n, pointf *p1, pointf *p2)
 
static segitem_tapprox_bezier (pointf *cp, segitem_t *lp)
 
static double bisect (pointf pp, pointf cp, pointf np)
 
static void mkSegPts (segitem_t *prv, segitem_t *cur, segitem_t *nxt, pointf *p1, pointf *p2, double w2)
 
static void map_output_bspline (points_t *pbs, pbs_size_t *pbs_n, bezier *bp, double w2)
 
static bool is_natural_number (const char *sstr)
 
static int layer_index (GVC_t *gvc, char *str, int all)
 
static bool selectedLayer (GVC_t *gvc, int layerNum, int numLayers, char *spec)
 
static bool selectedlayer (GVJ_t *job, char *spec)
 
static int * parse_layerselect (GVC_t *gvc, char *p)
 
static int parse_layers (GVC_t *gvc, graph_t *g, char *p)
 
static int chkOrder (graph_t *g)
 
static void init_layering (GVC_t *gvc, graph_t *g)
 
static int numPhysicalLayers (GVJ_t *job)
 Return number of physical layers to be emitted.
 
static void firstlayer (GVJ_t *job, int **listp)
 
static bool validlayer (GVJ_t *job)
 
static void nextlayer (GVJ_t *job, int **listp)
 
static point pagecode (GVJ_t *job, char c)
 
static void init_job_pagination (GVJ_t *job, graph_t *g)
 
static void firstpage (GVJ_t *job)
 
static bool validpage (GVJ_t *job)
 
static void nextpage (GVJ_t *job)
 
static bool write_edge_test (Agraph_t *g, Agedge_t *e)
 
static bool write_node_test (Agraph_t *g, Agnode_t *n)
 
static pointfcopyPts (xdot_point *inpts, size_t numpts)
 
static void emit_xdot (GVJ_t *job, xdot *xd)
 
static void emit_background (GVJ_t *job, graph_t *g)
 
static void setup_page (GVJ_t *job)
 
static bool node_in_layer (GVJ_t *job, graph_t *g, node_t *n)
 
static bool edge_in_layer (GVJ_t *job, edge_t *e)
 
static bool clust_in_layer (GVJ_t *job, graph_t *sg)
 
static bool node_in_box (node_t *n, boxf b)
 
static void emit_begin_node (GVJ_t *job, node_t *n)
 
static void emit_end_node (GVJ_t *job)
 
static void emit_node (GVJ_t *job, node_t *n)
 
static pointf computeoffset_p (pointf p, pointf q, double d)
 
static pointf computeoffset_qr (pointf p, pointf q, pointf r, pointf s, double d)
 
static void emit_attachment (GVJ_t *job, textlabel_t *lp, splines *spl)
 
static char * default_pencolor (agxbuf *buf, const char *pencolor, const char *deflt)
 
static double approxLen (pointf *pts)
 
static void splitBSpline (bezier *bz, double t, bezier *left, bezier *right)
 
static int multicolor (GVJ_t *job, edge_t *e, char **styles, const char *colors, double arrowsize, double penwidth)
 
static void free_stroke (stroke_t sp)
 
static double forfunc (double curlen, double totallen, double initwid)
 
static double revfunc (double curlen, double totallen, double initwid)
 
static double nonefunc (double curlen, double totallen, double initwid)
 
static double bothfunc (double curlen, double totallen, double initwid)
 
static radfunc_t taperfun (edge_t *e)
 
static void emit_edge_graphics (GVJ_t *job, edge_t *e, char **styles)
 
static bool edge_in_box (edge_t *e, boxf b)
 
static void emit_begin_edge (GVJ_t *job, edge_t *e, char **styles)
 
static void emit_edge_label (GVJ_t *job, textlabel_t *lbl, emit_state_t lkind, int explicit, char *url, char *tooltip, char *target, char *id, splines *spl)
 
static void nodeIntersect (GVJ_t *job, pointf p, bool explicit_iurl, char *iurl, bool explicit_itooltip)
 
static void emit_end_edge (GVJ_t *job)
 
static void emit_edge (GVJ_t *job, edge_t *e)
 
static void expandBB (boxf *bb, pointf p)
 
static boxf ptsBB (xdot_point *inpts, size_t numpts, boxf *bb)
 
static boxf textBB (double x, double y, textspan_t *span)
 
static void freePara (xdot_op *xop)
 
boxf xdotBB (Agraph_t *g)
 
static void init_gvc (GVC_t *gvc, graph_t *g)
 
static void init_job_pad (GVJ_t *job)
 
static void init_job_margin (GVJ_t *job)
 
static void init_job_dpi (GVJ_t *job, graph_t *g)
 
static void init_job_viewport (GVJ_t *job, graph_t *g)
 
static void emit_cluster_colors (GVJ_t *job, graph_t *g)
 
static void emit_colors (GVJ_t *job, graph_t *g)
 
static void emit_view (GVJ_t *job, graph_t *g, int flags)
 
static void emit_begin_graph (GVJ_t *job, graph_t *g)
 
static void emit_end_graph (GVJ_t *job)
 
static void emit_page (GVJ_t *job, graph_t *g)
 
void emit_graph (GVJ_t *job, graph_t *g)
 
bool emit_once (char *str)
 
void emit_once_reset (void)
 
static void emit_begin_cluster (GVJ_t *job, Agraph_t *sg)
 
static void emit_end_cluster (GVJ_t *job)
 
void emit_clusters (GVJ_t *job, Agraph_t *g, int flags)
 
static bool is_style_delim (int c)
 
static token_t style_token (char **s)
 
char ** parse_style (char *s)
 
static boxf bezier_bb (bezier bz)
 
static void init_splines_bb (splines *spl)
 
static void init_bb_edge (edge_t *e)
 
static void init_bb_node (graph_t *g, node_t *n)
 
static void init_bb (graph_t *g)
 
void gv_fixLocale (int set)
 
int gvRenderJobs (GVC_t *gvc, graph_t *g)
 
bool findStopColor (const char *colorlist, char *clrs[2], double *frac)
 

Variables

static char * defaultlinestyle [3] = { "solid\0", "setlinewidth\0001\0", 0 }
 
static char * saved_color_scheme
 
static const char adjust [] = {'l', 'n', 'r'}
 
static Dict_tstrings
 
static Dtdisc_t stringdict
 
gvevent_key_binding_t gvevent_key_binding []
 
const size_t gvevent_key_binding_size
 
gvdevice_callbacks_t gvdevice_callbacks
 

Macro Definition Documentation

◆ AEQ0

#define AEQ0 (   x)    (((x) < EPS) && ((x) > -EPS))

Definition at line 443 of file emit.c.

◆ EPS

#define EPS   1E-5

Definition at line 442 of file emit.c.

◆ EPSILON

#define EPSILON   .0001

Definition at line 51 of file emit.c.

◆ FINISH

#define FINISH ( )    if (Verbose) fprintf(stderr,"gvRenderJobs %s: %.2f secs.\n", agnameof(g), elapsed_sec())

Definition at line 3870 of file emit.c.

◆ FIRST_SEG

#define FIRST_SEG (   L)    ((L)->next == (segitem_t*)1)

Definition at line 802 of file emit.c.

◆ FUNLIMIT

#define FUNLIMIT   64

Definition at line 3672 of file emit.c.

◆ FUZZ

#define FUZZ   3

Definition at line 50 of file emit.c.

◆ HW

#define HW   2.0 /* maximum distance away from line, in points */

Definition at line 732 of file emit.c.

◆ INIT_SEG

#define INIT_SEG (   P,
  L 
)    {(L)->next = 0; (L)->p = P;}

Definition at line 803 of file emit.c.

◆ MARK_FIRST_SEG

#define MARK_FIRST_SEG (   L)    ((L)->next = (segitem_t*)1)

Definition at line 801 of file emit.c.

◆ NotFirstPage

#define NotFirstPage (   j)    (((j)->layerNum>1)||((j)->pagesArrayElem.x > 0)||((j)->pagesArrayElem.x > 0))

Definition at line 3273 of file emit.c.

◆ P2RECT

#define P2RECT (   p,
  pr,
  sx,
  sy 
)    (pr[0].x = p.x - sx, pr[0].y = p.y - sy, pr[1].x = p.x + sx, pr[1].y = p.y + sy)

Definition at line 49 of file emit.c.

◆ SEP

#define SEP   2.0

◆ SID

#define SID   1

Definition at line 3633 of file emit.c.

◆ THIN_LINE

#define THIN_LINE   0.5

Definition at line 531 of file emit.c.

Typedef Documentation

◆ radfunc_t

typedef double(* radfunc_t) (double, double, double)

Definition at line 2110 of file emit.c.

◆ segitem_t

typedef struct segitem_s segitem_t

Function Documentation

◆ appendSeg()

static segitem_t * appendSeg ( pointf  p,
segitem_t lp 
)
static

Definition at line 805 of file emit.c.

References gv_alloc(), INIT_SEG, segitem_s::next, and segitem_s::p.

Referenced by approx_bezier().

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

◆ approx_bezier()

static segitem_t * approx_bezier ( pointf cp,
segitem_t lp 
)
static

Definition at line 842 of file emit.c.

References appendSeg(), approx_bezier(), Bezier(), check_control_points(), FIRST_SEG, INIT_SEG, left, and right.

Referenced by approx_bezier(), and map_output_bspline().

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

◆ approxLen()

static double approxLen ( pointf pts)
static

Definition at line 1958 of file emit.c.

References DIST.

Referenced by splitBSpline().

Here is the caller graph for this function:

◆ bezier_bb()

static boxf bezier_bb ( bezier  bz)
static

Definition at line 3747 of file emit.c.

References expandbp(), bezier::list, boxf::LL, bezier::size, boxf::UR, pointf_s::x, and pointf_s::y.

Referenced by init_splines_bb().

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

◆ bisect()

static double bisect ( pointf  pp,
pointf  cp,
pointf  np 
)
static

Definition at line 862 of file emit.c.

References M_PI, pointf_s::x, and pointf_s::y.

Referenced by mkSegPts().

Here is the caller graph for this function:

◆ bothfunc()

static double bothfunc ( double  curlen,
double  totallen,
double  initwid 
)
static

Definition at line 2130 of file emit.c.

Referenced by taperfun().

Here is the caller graph for this function:

◆ check_control_points()

static bool check_control_points ( pointf cp)
static

Definition at line 739 of file emit.c.

References HW, and ptToLine2().

Referenced by approx_bezier(), and update_bb_bz().

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

◆ checkClusterStyle()

static char ** checkClusterStyle ( graph_t sg,
graphviz_polygon_style_t flagp 
)
static

Definition at line 358 of file emit.c.

References agget(), graphviz_polygon_style_t::filled, NULL, parse_style(), graphviz_polygon_style_t::radial, graphviz_polygon_style_t::rounded, and graphviz_polygon_style_t::striped.

Referenced by emit_background(), and emit_clusters().

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

◆ chkOrder()

static int chkOrder ( graph_t g)
static

Definition at line 1118 of file emit.c.

References agget(), EMIT_EDGE_SORTED, EMIT_SORTED, and segitem_s::p.

Referenced by gvRenderJobs().

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

◆ clust_in_layer()

static bool clust_in_layer ( GVJ_t job,
graph_t sg 
)
static

Definition at line 1668 of file emit.c.

References agattr_text(), agfstnode(), agnxtnode(), AGRAPH, late_string(), node_in_layer(), GVJ_s::numLayers, and selectedlayer().

Referenced by emit_clusters().

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

◆ computeoffset_p()

static pointf computeoffset_p ( pointf  p,
pointf  q,
double  d 
)
static

Definition at line 1886 of file emit.c.

References EPSILON, segitem_s::p, pointf_s::x, and pointf_s::y.

Referenced by emit_edge_graphics().

Here is the caller graph for this function:

◆ computeoffset_qr()

static pointf computeoffset_qr ( pointf  p,
pointf  q,
pointf  r,
pointf  s,
double  d 
)
static

Definition at line 1899 of file emit.c.

References EPSILON, len(), segitem_s::p, pointf_s::x, and pointf_s::y.

Referenced by emit_edge_graphics().

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

◆ copyPts()

static pointf * copyPts ( xdot_point inpts,
size_t  numpts 
)
static

Definition at line 1394 of file emit.c.

References gv_calloc(), pointf_s::x, xdot_point::x, pointf_s::y, and xdot_point::y.

Referenced by emit_xdot().

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

◆ default_pencolor()

static char * default_pencolor ( agxbuf buf,
const char *  pencolor,
const char *  deflt 
)
static

Definition at line 1948 of file emit.c.

References agxbprint(), agxbput(), agxbuse(), and segitem_s::p.

Referenced by emit_edge_graphics().

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

◆ edge_in_box()

static bool edge_in_box ( edge_t e,
boxf  b 
)
static

Definition at line 2375 of file emit.c.

References splines::bb, boxf_overlap(), ED_label, ED_spl, ED_xlabel, overlap_label(), and textlabel_t::set.

Referenced by emit_edge().

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

◆ edge_in_layer()

static bool edge_in_layer ( GVJ_t job,
edge_t e 
)
static

Definition at line 1648 of file emit.c.

References aghead, agtail, cnt(), E_layer, late_string(), N_layer, GVJ_s::numLayers, and selectedlayer().

Referenced by emit_edge().

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

◆ emit_attachment()

static void emit_attachment ( GVJ_t job,
textlabel_t lp,
splines spl 
)
static

Definition at line 1920 of file emit.c.

References GVC_s::defaultlinestyle, textlabel_t::dimen, dotneato_closest(), textlabel_t::fontcolor, gv_isspace(), GVJ_s::gvc, gvrender_polyline(), gvrender_set_pencolor(), gvrender_set_style(), textlabel_t::pos, textlabel_t::text, pointf_s::x, and pointf_s::y.

Referenced by emit_edge_label().

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

◆ emit_background()

static void emit_background ( GVJ_t job,
graph_t g 
)
static

Definition at line 1517 of file emit.c.

References agget(), checkClusterStyle(), GVJ_s::clip, DEFAULT_COLOR, emit_xdot(), FILL, findStopColor(), GVJ_s::flags, free(), G_gradientangle, GD_drawing, GRADIENT, GVDEVICE_DOES_TRUECOLOR, gvrender_box(), GVRENDER_NO_WHITE_BG, gvrender_set_fillcolor(), gvrender_set_gradient_vals(), gvrender_set_pencolor(), late_int(), graphviz_polygon_style_t::radial, RGRADIENT, str, streq(), and xd.

Referenced by emit_page().

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

◆ emit_begin_cluster()

static void emit_begin_cluster ( GVJ_t job,
Agraph_t sg 
)
static

Definition at line 3429 of file emit.c.

References CLUSTER_OBJTYPE, EMIT_CDRAW, obj_state_s::emit_state, GD_label, gvrender_begin_cluster(), initObjMapData(), push_obj_state(), obj_state_s::sg, obj_state_s::type, and obj_state_s::u.

Referenced by emit_clusters().

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

◆ emit_begin_edge()

static void emit_begin_edge ( GVJ_t job,
edge_t e,
char **  styles 
)
static

Definition at line 2395 of file emit.c.

References agget(), aghead, agraphof(), agtail, agxbfree(), agxget(), obj_state_s::e, E_penwidth, ED_head_label, ED_label, ED_spl, ED_tail_label, ED_xlabel, EDGE_OBJTYPE, EMIT_EDRAW, obj_state_s::emit_state, obj_state_s::explicit_edgetarget, obj_state_s::explicit_headtarget, obj_state_s::explicit_headtooltip, obj_state_s::explicit_headurl, obj_state_s::explicit_labeltooltip, obj_state_s::explicit_tailtarget, obj_state_s::explicit_tailtooltip, obj_state_s::explicit_tailurl, obj_state_s::explicit_tooltip, flags, GVJ_s::flags, free(), GD_odim, getObjId(), gv_strdup(), gvrender_begin_anchor(), gvrender_begin_edge(), GVRENDER_DOES_LABELS, GVRENDER_DOES_MAP_POLYGON, GVRENDER_DOES_MAPS, GVRENDER_DOES_TARGETS, GVRENDER_DOES_TOOLTIPS, GVRENDER_DOES_TRANSFORM, GVRENDER_DOES_Z, gvrender_ptf_A(), gvrender_set_penwidth(), gvrender_set_style(), obj_state_s::head_z, obj_state_s::headlabel, obj_state_s::headtarget, obj_state_s::headtooltip, obj_state_s::headurl, obj_state_s::id, obj_state_s::label, obj_state_s::labeledgealigned, obj_state_s::labeltarget, obj_state_s::labeltooltip, obj_state_s::labelurl, late_double(), splines::list, map_output_bspline(), MAP_POLYGON, mapbool(), ND_pos, NULL, GVJ_s::obj, obj_state_s::penwidth, penwidth, POINTS, preprocessTooltip(), push_obj_state(), splines::size, strdup_and_subst_obj(), obj_state_s::tail_z, obj_state_s::taillabel, obj_state_s::tailtarget, obj_state_s::tailtooltip, obj_state_s::tailurl, obj_state_s::target, textlabel_t::text, obj_state_s::tooltip, obj_state_s::type, obj_state_s::u, obj_state_s::url, obj_state_s::url_bsplinemap_n, obj_state_s::url_bsplinemap_p, obj_state_s::url_bsplinemap_poly_n, obj_state_s::url_map_n, obj_state_s::url_map_p, obj_state_s::url_map_shape, and obj_state_s::xlabel.

Referenced by emit_edge().

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

◆ emit_begin_graph()

static void emit_begin_graph ( GVJ_t job,
graph_t g 
)
static

Definition at line 3253 of file emit.c.

References EMIT_GDRAW, obj_state_s::emit_state, obj_state_s::g, GD_label, gvrender_begin_graph(), initObjMapData(), push_obj_state(), ROOTGRAPH_OBJTYPE, obj_state_s::type, and obj_state_s::u.

Referenced by emit_graph().

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

◆ emit_begin_node()

static void emit_begin_node ( GVJ_t job,
node_t n 
)
static

◆ emit_cluster_colors()

static void emit_cluster_colors ( GVJ_t job,
graph_t g 
)
static

Definition at line 3113 of file emit.c.

References agget(), emit_cluster_colors(), GD_clust, GD_n_cluster, gvrender_set_fillcolor(), gvrender_set_pencolor(), and str.

Referenced by emit_cluster_colors(), and emit_colors().

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 3448 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_colors()

static void emit_colors ( GVJ_t job,
graph_t g 
)
static

Definition at line 3135 of file emit.c.

References agfstnode(), agfstout(), agget(), agnxtnode(), agnxtout(), DEFAULT_FILL, emit_cluster_colors(), free(), gv_strdup(), gvrender_set_fillcolor(), gvrender_set_pencolor(), and str.

Referenced by emit_graph().

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

◆ emit_edge()

static void emit_edge ( GVJ_t job,
edge_t e 
)
static

Definition at line 2721 of file emit.c.

References aghead, agisdirected(), agnameof(), agraphof(), agtail, agxbfree(), agxbput(), agxbuse(), GVJ_s::clip, E_comment, E_style, edge, edge_in_box(), edge_in_layer(), emit_begin_edge(), emit_edge_graphics(), emit_end_edge(), gvrender_comment(), late_string(), NULL, segitem_s::p, parse_style(), and streq().

Referenced by emit_clusters(), and emit_view().

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

◆ emit_edge_graphics()

◆ emit_edge_label()

static void emit_edge_label ( GVJ_t job,
textlabel_t lbl,
emit_state_t  lkind,
int  explicit,
char *  url,
char *  tooltip,
char *  target,
char *  id,
splines spl 
)
static

Definition at line 2572 of file emit.c.

References agxbfree(), agxbprint(), agxbuse(), emit_attachment(), EMIT_CLUSTERS_LAST, EMIT_ELABEL, EMIT_HLABEL, emit_label(), obj_state_s::emit_state, EMIT_TLABEL, flags, GVJ_s::flags, gvrender_begin_anchor(), gvrender_end_anchor(), map_label(), NULL, GVJ_s::obj, textlabel_t::set, type, and UNREACHABLE.

Referenced by emit_end_edge().

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

◆ emit_end_cluster()

static void emit_end_cluster ( GVJ_t job)
static

Definition at line 3443 of file emit.c.

References gvrender_end_cluster(), and pop_obj_state().

Referenced by emit_clusters().

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

◆ emit_end_edge()

◆ emit_end_graph()

static void emit_end_graph ( GVJ_t job)
static

Definition at line 3267 of file emit.c.

References gvrender_end_graph(), and pop_obj_state().

Referenced by emit_graph().

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

◆ emit_end_node()

static void emit_end_node ( GVJ_t job)
static

Definition at line 1835 of file emit.c.

References free(), gvrender_end_node(), NULL, pop_obj_state(), saved_color_scheme, and setColorScheme().

Referenced by emit_node().

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 3352 of file emit.c.

References agattr_text(), agfstnode(), agnxtnode(), AGRAPH, GVJ_s::devscale, GVJ_s::dpi, emit_begin_graph(), emit_colors(), EMIT_COLORS, emit_end_graph(), emit_page(), firstlayer(), firstpage(), flags, GVJ_s::flags, gvrender_begin_layer(), gvrender_comment(), gvrender_end_layer(), GVRENDER_Y_GOES_DOWN, GVJ_s::height, late_string(), GVJ_s::layerNum, ND_state, nextlayer(), nextpage(), numPhysicalLayers(), POINTS_PER_INCH, GVJ_s::rotation, GVJ_s::scale, validlayer(), validpage(), GVJ_s::view, GVJ_s::width, pointf_s::x, pointf_s::y, Y_invert, and GVJ_s::zoom.

Referenced by gvevent_refresh(), and gvRenderJobs().

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 633 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_node()

static void emit_node ( GVJ_t job,
node_t n 
)
static

Definition at line 1847 of file emit.c.

References agnameof(), agraphof(), GVJ_s::clip, GVC_s::common, emit_begin_node(), emit_end_node(), emit_label(), EMIT_NLABEL, GVJ_s::gvc, gvc, gvrender_comment(), late_string(), N_comment, N_style, ND_shape, ND_state, ND_xlabel, node_in_box(), node_in_layer(), NULL, segitem_s::p, parse_style(), streq(), and GVCOMMON_s::viewNum.

Referenced by emit_clusters(), and emit_view().

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

◆ emit_once()

bool emit_once ( char *  str)

Definition at line 3411 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 3421 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:

◆ emit_page()

◆ emit_view()

static void emit_view ( GVJ_t job,
graph_t g,
int  flags 
)
static

Definition at line 3190 of file emit.c.

References agfstnode(), agfstout(), aghead, agnxtnode(), agnxtout(), GVC_s::common, emit_clusters(), EMIT_CLUSTERS_LAST, emit_edge(), EMIT_EDGE_SORTED, emit_node(), EMIT_PREORDER, EMIT_SORTED, flags, GVJ_s::gvc, gvc, gvrender_begin_edges(), gvrender_begin_nodes(), gvrender_end_edges(), gvrender_end_nodes(), GVCOMMON_s::viewNum, write_edge_test(), and write_node_test().

Referenced by emit_page().

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

◆ emit_xdot()

static void emit_xdot ( GVJ_t job,
xdot xd 
)
static

◆ expandBB()

static void expandBB ( boxf bb,
pointf  p 
)
static

Definition at line 2767 of file emit.c.

References boxf::LL, segitem_s::p, boxf::UR, pointf_s::x, and pointf_s::y.

Referenced by ptsBB(), and xdotBB().

Here is the caller graph for this function:

◆ findStopColor()

bool findStopColor ( const char *  colorlist,
char *  clrs[2],
double *  frac 
)

Definition at line 3998 of file emit.c.

References agwarningf(), color(), gv_strdup(), NULL, and parseSegs().

Referenced by emit_background(), emit_clusters(), poly_gencode(), record_gencode(), and setFill().

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

◆ firstlayer()

static void firstlayer ( GVJ_t job,
int **  listp 
)
static

Definition at line 1162 of file emit.c.

References agwarningf(), cnt(), GVJ_s::flags, GVJ_s::gvc, GVDEVICE_DOES_LAYERS, GVC_s::layerlist, GVJ_s::layerNum, NULL, GVC_s::numLayers, GVJ_s::numLayers, and GVJ_s::output_langname.

Referenced by emit_graph().

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

◆ firstpage()

static void firstpage ( GVJ_t job)
static

Definition at line 1343 of file emit.c.

References GVJ_s::pagesArrayElem, and GVJ_s::pagesArrayFirst.

Referenced by emit_graph().

Here is the caller graph for this function:

◆ forfunc()

static double forfunc ( double  curlen,
double  totallen,
double  initwid 
)
static

Definition at line 2112 of file emit.c.

Referenced by taperfun().

Here is the caller graph for this function:

◆ free_stroke()

static void free_stroke ( stroke_t  sp)
static

Definition at line 2106 of file emit.c.

References free(), and stroke_t::vertices.

Referenced by emit_edge_graphics().

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

◆ freePara()

static void freePara ( xdot_op xop)
static

Definition at line 2822 of file emit.c.

References free_textspan(), _xdot_op::kind, exdot_op::op, exdot_op::span, and xd_text.

Referenced by xdotBB().

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

◆ freeSeg()

static void freeSeg ( colorseg_t  seg)
static

Definition at line 408 of file emit.c.

References colorseg_t::color, and free().

Here is the call graph for this function:

◆ getObjId()

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

Definition at line 200 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:

◆ getSegLen()

static double getSegLen ( strview_t s)
static

Definition at line 420 of file emit.c.

Referenced by parseSegs().

Here is the caller graph for this function:

◆ gv_fixLocale()

void gv_fixLocale ( int  set)

Definition at line 3848 of file emit.c.

References cnt(), free(), gv_strdup(), and NULL.

Referenced by attach_attrs_and_arrows(), gvLayoutJobs(), and gvRenderJobs().

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

◆ init_bb()

static void init_bb ( graph_t g)
static

Definition at line 3828 of file emit.c.

References agfstnode(), agnxtnode(), and init_bb_node().

Referenced by gvRenderJobs().

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

◆ init_bb_edge()

static void init_bb_edge ( edge_t e)
static

Definition at line 3798 of file emit.c.

References ED_spl, and init_splines_bb().

Referenced by init_bb_node().

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

◆ init_bb_node()

static void init_bb_node ( graph_t g,
node_t n 
)
static

Definition at line 3807 of file emit.c.

References agfstout(), agnxtout(), init_bb_edge(), ND_bb, ND_coord, ND_ht, ND_lw, and ND_rw.

Referenced by init_bb().

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

◆ init_gvc()

static void init_gvc ( GVC_t gvc,
graph_t g 
)
static

Definition at line 2905 of file emit.c.

References agfindgraphattr, agget(), agnameof(), GVC_s::bb, DEFAULT_FONTNAME, DEFAULT_FONTSIZE, GVC_s::defaultfontname, GVC_s::defaultfontsize, defaultlinestyle, GVC_s::defaultlinestyle, GVC_s::g, G_penwidth, G_peripheries, GD_bb, GD_drawing, GVC_s::graph_sets_margin, GVC_s::graph_sets_pad, GVC_s::graph_sets_pageSize, GVC_s::graphname, gvc, late_double(), late_nnstring(), GVC_s::margin, MIN_FONTSIZE, N_fontname, N_fontsize, NULL, segitem_s::p, GVC_s::pad, GVC_s::pagedir, GVC_s::pageSize, POINTS_PER_INCH, GVC_s::rotation, pointf_s::x, and pointf_s::y.

Referenced by gvRenderJobs().

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

◆ init_job_dpi()

static void init_job_dpi ( GVJ_t job,
graph_t g 
)
static

Definition at line 3017 of file emit.c.

References GVC_s::active_jobs, gvdevice_features_t::default_dpi, GVJ_s::device, GVJ_s::device_dpi, GVJ_s::device_sets_dpi, GVJ_s::dpi, gvplugin_active_device_s::features, GD_drawing, GVJ_s::gvc, GVRENDER_PLUGIN, GVJ_s::output_lang, pointf_s::x, and pointf_s::y.

Referenced by gvRenderJobs().

Here is the caller graph for this function:

◆ init_job_margin()

static void init_job_margin ( GVJ_t job)
static

Definition at line 2993 of file emit.c.

References DEFAULT_EMBED_MARGIN, gvdevice_features_t::default_margin, DEFAULT_PRINT_MARGIN, GVJ_s::device, gvplugin_active_device_s::features, GVC_s::graph_sets_margin, GVJ_s::gvc, gvc, GVRENDER_PLUGIN, GVC_s::margin, GVJ_s::margin, METAPOST, MIF, GVJ_s::output_lang, PCL, QPDF, VTX, pointf_s::x, and pointf_s::y.

Referenced by gvRenderJobs().

Here is the caller graph for this function:

◆ init_job_pad()

static void init_job_pad ( GVJ_t job)
static

Definition at line 2974 of file emit.c.

References DEFAULT_GRAPH_PAD, gvrender_features_t::default_pad, gvplugin_active_render_s::features, GVC_s::graph_sets_pad, GVJ_s::gvc, gvc, GVRENDER_PLUGIN, GVJ_s::output_lang, GVC_s::pad, GVJ_s::pad, GVJ_s::render, pointf_s::x, and pointf_s::y.

Referenced by gvRenderJobs().

Here is the caller graph for this function:

◆ init_job_pagination()

static void init_job_pagination ( GVJ_t job,
graph_t g 
)
static

Definition at line 1228 of file emit.c.

References agwarningf(), GVJ_s::canvasBox, gvdevice_features_t::default_pagesize, GVJ_s::device, GVJ_s::dpi, EPSILON, exch_xy(), exch_xyf(), gvplugin_active_device_s::features, gvplugin_active_render_s::features, GVJ_s::flags, GD_drawing, GVC_s::graph_sets_pageSize, GVJ_s::gvc, gvc, GVDEVICE_DOES_PAGES, GVJ_s::height, box::LL, boxf::LL, GVJ_s::margin, GVJ_s::numPages, GVJ_s::pageBoundingBox, pagecode(), GVC_s::pagedir, GVJ_s::pagesArrayFirst, GVJ_s::pagesArrayMajor, GVJ_s::pagesArrayMinor, GVJ_s::pagesArraySize, GVC_s::pageSize, GVJ_s::pageSize, POINTS_PER_INCH, GVJ_s::render, GVJ_s::rotation, ROUND, box::UR, boxf::UR, GVJ_s::view, GVJ_s::width, point::x, pointf_s::x, point::y, pointf_s::y, and GVJ_s::zoom.

Referenced by gvRenderJobs().

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

◆ init_job_viewport()

static void init_job_viewport ( GVJ_t job,
graph_t g 
)
static

Definition at line 3040 of file emit.c.

References add_pointf(), agfindnode, agget(), GVC_s::bb, GVJ_s::bb, GVJ_s::focus, free(), GD_drawing, gv_alloc(), GVJ_s::gvc, gvc, boxf::LL, ND_coord, NULL, GVJ_s::pad, Agraph_s::root, GVC_s::rotation, GVJ_s::rotation, scale(), str, sub_pointf(), boxf::UR, GVJ_s::view, pointf_s::x, pointf_s::y, and GVJ_s::zoom.

Referenced by gvRenderJobs().

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

◆ init_layering()

static void init_layering ( GVC_t gvc,
graph_t g 
)
static

Definition at line 1130 of file emit.c.

References agget(), free(), gvc, GVC_s::layerIDs, GVC_s::layerlist, GVC_s::layers, NULL, GVC_s::numLayers, parse_layers(), parse_layerselect(), and str.

Referenced by gvRenderJobs().

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

◆ init_splines_bb()

static void init_splines_bb ( splines spl)
static

Definition at line 3772 of file emit.c.

References arrow_bb(), splines::bb, bezier_bb(), bezier::eflag, bezier::ep, EXPANDBB, bezier::list, splines::list, bezier::sflag, bezier::size, splines::size, and bezier::sp.

Referenced by init_bb_edge().

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 59 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()

bool 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:

◆ initObjMapData()

static void initObjMapData ( GVJ_t job,
textlabel_t lab,
void *  gobj 
)
static

Definition at line 311 of file emit.c.

References agget(), agxbfree(), free(), getObjId(), id, initMapData(), NULL, preprocessTooltip(), and textlabel_t::text.

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

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

◆ interpretCRNL()

static char * interpretCRNL ( char *  ins)
static

Definition at line 250 of file emit.c.

References ins().

Referenced by preprocessTooltip().

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

◆ is_natural_number()

static bool is_natural_number ( const char *  sstr)
static

Definition at line 966 of file emit.c.

References gv_isdigit(), and str.

Referenced by layer_index().

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

◆ is_style_delim()

static bool is_style_delim ( int  c)
static

Definition at line 3620 of file emit.c.

Referenced by style_token().

Here is the caller graph for this function:

◆ isFilled()

static bool isFilled ( node_t n)
static

Definition at line 698 of file emit.c.

References late_nnstring(), N_style, and parse_style().

Referenced by emit_begin_node().

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

◆ isRect()

static bool isRect ( polygon_t p)
static

Definition at line 688 of file emit.c.

References polygon_t::distortion, is_exactly_zero(), polygon_t::orientation, polygon_t::sides, and polygon_t::skew.

Referenced by emit_begin_node().

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

◆ layer_index()

static int layer_index ( GVC_t gvc,
char *  str,
int  all 
)
static

Definition at line 976 of file emit.c.

References gvc, is_natural_number(), GVC_s::layerIDs, GVC_s::numLayers, str, and streq().

Referenced by selectedLayer().

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

◆ layerPagePrefix()

static void layerPagePrefix ( GVJ_t job,
agxbuf xb 
)
static

Definition at line 188 of file emit.c.

References agxbprint(), GVJ_s::flags, GVJ_s::gvc, GVDEVICE_DOES_LAYERS, GVC_s::layerIDs, GVJ_s::layerNum, GVJ_s::pagesArrayElem, point::x, and point::y.

Referenced by emit_page(), and getObjId().

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

◆ map_bspline_poly()

static void map_bspline_poly ( points_t *  pbs_p,
pbs_size_t *  pbs_n,
size_t  n,
pointf p1,
pointf p2 
)
static

Definition at line 818 of file emit.c.

References psmapOutput(), and UNUSED.

Referenced by map_output_bspline().

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

◆ map_label()

static void map_label ( GVJ_t job,
textlabel_t lab 
)
static

Definition at line 659 of file emit.c.

References textlabel_t::dimen, flags, GVJ_s::flags, free(), gv_calloc(), GVRENDER_DOES_MAP_RECTANGLE, GVRENDER_DOES_MAPS, GVRENDER_DOES_TOOLTIPS, GVRENDER_DOES_TRANSFORM, gvrender_ptf_A(), MAP_POLYGON, MAP_RECTANGLE, GVJ_s::obj, P2RECT, textlabel_t::pos, rect2poly(), obj_state_s::url_map_n, obj_state_s::url_map_p, obj_state_s::url_map_shape, pointf_s::x, and pointf_s::y.

Referenced by emit_edge_label().

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

◆ map_output_bspline()

static void map_output_bspline ( points_t *  pbs,
pbs_size_t *  pbs_n,
bezier bp,
double  w2 
)
static

Definition at line 924 of file emit.c.

References approx_bezier(), cnt(), free(), gv_alloc(), bezier::list, map_bspline_poly(), MARK_FIRST_SEG, mkSegPts(), segitem_s::next, NULL, and bezier::size.

Referenced by emit_begin_edge().

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

◆ map_point()

static void map_point ( GVJ_t job,
pointf  pf 
)
static

Definition at line 333 of file emit.c.

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

Referenced by nodeIntersect().

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

◆ mkSegPts()

static void mkSegPts ( segitem_t prv,
segitem_t cur,
segitem_t nxt,
pointf p1,
pointf p2,
double  w2 
)
static

Definition at line 880 of file emit.c.

References bisect(), segitem_s::p, pointf_s::x, and pointf_s::y.

Referenced by map_output_bspline().

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

◆ multicolor()

static int multicolor ( GVJ_t job,
edge_t e,
char **  styles,
const char *  colors,
double  arrowsize,
double  penwidth 
)
static

Definition at line 2028 of file emit.c.

References AEQ0, agerr(), aghead, agisdirected(), agnameof(), AGPREV, agraphof(), agtail, arrow_gen(), color(), ED_spl, bezier::eflag, EMIT_HDRAW, EMIT_TDRAW, bezier::ep, free(), gvrender_beziercurve(), gvrender_set_fillcolor(), gvrender_set_pencolor(), gvrender_set_style(), left, bezier::list, NULL, parseSegs(), penwidth, bezier::sflag, bezier::size, bezier::sp, and splitBSpline().

Referenced by emit_edge_graphics().

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

◆ nextlayer()

static void nextlayer ( GVJ_t job,
int **  listp 
)
static

Definition at line 1192 of file emit.c.

References GVJ_s::layerNum.

Referenced by emit_graph().

Here is the caller graph for this function:

◆ nextpage()

static void nextpage ( GVJ_t job)
static

Definition at line 1356 of file emit.c.

References add_point(), GVJ_s::pagesArrayElem, GVJ_s::pagesArrayFirst, GVJ_s::pagesArrayMajor, GVJ_s::pagesArrayMinor, validpage(), point::x, and point::y.

Referenced by emit_graph().

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

◆ node_in_box()

static bool node_in_box ( node_t n,
boxf  b 
)
static

Definition at line 1686 of file emit.c.

References boxf_overlap(), and ND_bb.

Referenced by emit_node().

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

◆ node_in_layer()

static bool node_in_layer ( GVJ_t job,
graph_t g,
node_t n 
)
static

Definition at line 1626 of file emit.c.

References agfstedge(), agnxtedge(), E_layer, late_string(), N_layer, NULL, GVJ_s::numLayers, and selectedlayer().

Referenced by clust_in_layer(), and emit_node().

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

◆ nodeIntersect()

static void nodeIntersect ( GVJ_t job,
pointf  p,
bool  explicit_iurl,
char *  iurl,
bool  explicit_itooltip 
)
static

Definition at line 2631 of file emit.c.

References obj_state_s::explicit_tooltip, map_point(), GVJ_s::obj, segitem_s::p, and obj_state_s::url.

Referenced by emit_end_edge().

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

◆ nonefunc()

static double nonefunc ( double  curlen,
double  totallen,
double  initwid 
)
static

Definition at line 2122 of file emit.c.

Referenced by taperfun().

Here is the caller graph for this function:

◆ numPhysicalLayers()

static int numPhysicalLayers ( GVJ_t job)
static

Definition at line 1152 of file emit.c.

References GVJ_s::gvc, GVC_s::layerlist, and GVJ_s::numLayers.

Referenced by emit_graph().

Here is the caller graph for this function:

◆ pagecode()

static point pagecode ( GVJ_t job,
char  c 
)
static

Definition at line 1203 of file emit.c.

References GVJ_s::pagesArrayFirst, GVJ_s::pagesArraySize, point::x, and point::y.

Referenced by init_job_pagination().

Here is the caller graph for this function:

◆ parse_layers()

static int parse_layers ( GVC_t gvc,
graph_t g,
char *  p 
)
static

Definition at line 1076 of file emit.c.

References agget(), agwarningf(), DEFAULT_LAYERLISTSEP, DEFAULT_LAYERSEP, gv_strdup(), gvc, GVC_s::layerDelims, GVC_s::layerIDs, GVC_s::layerListDelims, GVC_s::layers, NULL, segitem_s::p, and tok().

Referenced by init_layering().

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

◆ parse_layerselect()

static int * parse_layerselect ( GVC_t gvc,
char *  p 
)
static

Definition at line 1048 of file emit.c.

References agwarningf(), cnt(), free(), gv_calloc(), gvc, NULL, GVC_s::numLayers, segitem_s::p, and selectedLayer().

Referenced by init_layering().

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 3681 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:

◆ parseSegs()

static int parseSegs ( const char *  clrs,
colorsegs_t *  psegs 
)
static

Definition at line 461 of file emit.c.

References AEQ0, agerrorf(), agwarningf(), color(), del(), delta, getSegLen(), left, strview_str(), tok(), tok_end(), tok_get(), and tok_next().

Referenced by findStopColor(), multicolor(), stripedBox(), and wedgedEllipse().

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

◆ pEllipse()

static pointf * pEllipse ( double  a,
double  b,
size_t  np 
)
static

Definition at line 719 of file emit.c.

References gv_calloc(), M_PI, and ps.

Referenced by emit_begin_node().

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 123 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:

◆ preprocessTooltip()

static char * preprocessTooltip ( char *  s,
void *  gobj 
)
static

Definition at line 293 of file emit.c.

References agroot(), CHAR_LATIN1, GD_charset, htmlEntityUTF8(), interpretCRNL(), and latin1ToUTF8().

Referenced by emit_begin_edge(), and initObjMapData().

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

◆ psmapOutput()

static UNUSED void psmapOutput ( const points_t *  ps,
size_t  start,
size_t  n 
)
static

Definition at line 786 of file emit.c.

References ps, pointf_s::x, and pointf_s::y.

Referenced by map_bspline_poly().

Here is the caller graph for this function:

◆ ptsBB()

static boxf ptsBB ( xdot_point inpts,
size_t  numpts,
boxf bb 
)
static

Definition at line 2775 of file emit.c.

References expandBB(), boxf::LL, boxf::UR, pointf_s::x, xdot_point::x, pointf_s::y, and xdot_point::y.

Referenced by xdotBB().

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 99 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:

◆ revfunc()

static double revfunc ( double  curlen,
double  totallen,
double  initwid 
)
static

Definition at line 2117 of file emit.c.

Referenced by taperfun().

Here is the caller graph for this function:

◆ selectedLayer()

static bool selectedLayer ( GVC_t gvc,
int  layerNum,
int  numLayers,
char *  spec 
)
static

Definition at line 991 of file emit.c.

References BETWEEN, free(), gv_strdup(), gvc, layer_index(), GVC_s::layerDelims, GVC_s::layerListDelims, NULL, and SWAP.

Referenced by parse_layerselect(), and selectedlayer().

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

◆ selectedlayer()

static bool selectedlayer ( GVJ_t job,
char *  spec 
)
static

Definition at line 1028 of file emit.c.

References GVJ_s::gvc, GVJ_s::layerNum, GVJ_s::numLayers, and selectedLayer().

Referenced by clust_in_layer(), edge_in_layer(), and node_in_layer().

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

◆ setup_page()

static void setup_page ( GVJ_t job)
static

Definition at line 1573 of file emit.c.

References GVJ_s::boundingBox, GVJ_s::canvasBox, GVJ_s::clip, GVJ_s::common, exch_xy(), EXPANDBB, GVJ_s::flags, GVJ_s::focus, GVDEVICE_EVENTS, GVRENDER_Y_GOES_DOWN, boxf::LL, GVJ_s::pad, GVJ_s::pageBoundingBox, GVJ_s::pageBox, GVJ_s::pagesArrayElem, GVJ_s::pagesArraySize, GVJ_s::pageSize, GVJ_s::rotation, GVJ_s::translation, boxf::UR, GVJ_s::view, GVCOMMON_s::viewNum, point::x, pointf_s::x, point::y, pointf_s::y, Y_invert, and GVJ_s::zoom.

Referenced by emit_page().

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

◆ splitBSpline()

static void splitBSpline ( bezier bz,
double  t,
bezier left,
bezier right 
)
static

Definition at line 1974 of file emit.c.

References approxLen(), Bezier(), cnt(), free(), gv_calloc(), last, left, len(), bezier::list, right, and bezier::size.

Referenced by multicolor().

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 588 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:

◆ style_token()

static token_t style_token ( char **  s)
static

Definition at line 3645 of file emit.c.

References gv_isspace(), is_style_delim(), and SID.

Referenced by parse_style().

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

◆ taperfun()

static radfunc_t taperfun ( edge_t e)
static

Definition at line 2138 of file emit.c.

References aghead, agisdirected(), agraphof(), agxget(), bothfunc(), E_dir, forfunc(), nonefunc(), revfunc(), and streq().

Referenced by emit_edge_graphics().

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

◆ textBB()

static boxf textBB ( double  x,
double  y,
textspan_t span 
)
static

Definition at line 2798 of file emit.c.

References textspan_t::just, boxf::LL, textspan_t::size, boxf::UR, pointf_s::x, pointf_s::y, and textspan_t::yoffset_layout.

Referenced by xdotBB().

Here is the caller graph for this function:

◆ update_bb_bz()

void update_bb_bz ( boxf bb,
pointf cp 
)

Definition at line 747 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:

◆ validlayer()

static bool validlayer ( GVJ_t job)
static

Definition at line 1187 of file emit.c.

References GVJ_s::layerNum, and GVJ_s::numLayers.

Referenced by emit_graph().

Here is the caller graph for this function:

◆ validpage()

static bool validpage ( GVJ_t job)
static

Definition at line 1348 of file emit.c.

References GVJ_s::pagesArrayElem, GVJ_s::pagesArraySize, point::x, and point::y.

Referenced by emit_graph(), and nextpage().

Here is the caller graph for this function:

◆ wedgedEllipse()

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

Definition at line 542 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:

◆ write_edge_test()

static bool write_edge_test ( Agraph_t g,
Agedge_t e 
)
static

Definition at line 1368 of file emit.c.

References agcontains(), GD_clust, and GD_n_cluster.

Referenced by emit_view().

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

◆ write_node_test()

static bool write_node_test ( Agraph_t g,
Agnode_t n 
)
static

Definition at line 1381 of file emit.c.

References agcontains(), GD_clust, and GD_n_cluster.

Referenced by emit_view().

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

◆ xdotBB()

Variable Documentation

◆ adjust

const char adjust[] = {'l', 'n', 'r'}
static

Definition at line 2764 of file emit.c.

Referenced by fdp_tLayout(), init_nop(), x_layout(), and xdotBB().

◆ defaultlinestyle

char* defaultlinestyle[3] = { "solid\0", "setlinewidth\0001\0", 0 }
static

Definition at line 96 of file emit.c.

Referenced by init_gvc().

◆ gvdevice_callbacks

gvdevice_callbacks_t gvdevice_callbacks
extern

Definition at line 541 of file gvevent.c.

Referenced by gvRenderJobs().

◆ gvevent_key_binding

gvevent_key_binding_t gvevent_key_binding[]
extern

Definition at line 521 of file gvevent.c.

Referenced by gvRenderJobs().

◆ gvevent_key_binding_size

const size_t gvevent_key_binding_size
extern

Definition at line 538 of file gvevent.c.

Referenced by gvRenderJobs().

◆ saved_color_scheme

char* saved_color_scheme
static

Definition at line 1691 of file emit.c.

Referenced by emit_begin_node(), and emit_end_node().

◆ stringdict

Dtdisc_t stringdict
static
Initial value:
= {
.link = -1,
.freef = free,
}
void free(void *)

Definition at line 3406 of file emit.c.

Referenced by emit_once().

◆ strings

Dict_t* strings
static

Definition at line 3405 of file emit.c.

Referenced by emit_once(), and emit_once_reset().