Graphviz 12.0.1~dev.20240715.2254
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 <stdlib.h>
#include <string.h>
#include <limits.h>
#include <locale.h>
#include <math.h>
#include <common/geomprocs.h>
#include <common/render.h>
#include <cgraph/agxbuf.h>
#include <cgraph/alloc.h>
#include <cgraph/gv_ctype.h>
#include <cgraph/gv_math.h>
#include <cgraph/list.h>
#include <cgraph/streq.h>
#include <cgraph/unreachable.h>
#include <common/htmltable.h>
#include <gvc/gvc.h>
#include <cdt/cdt.h>
#include <pathplan/pathgeom.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  colorsegs_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)
 
int 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 freeSegs (colorsegs_t *segs)
 
static double getSegLen (char *s)
 
static int parseSegs (char *clrs, size_t nseg, colorsegs_t *psegs)
 
int wedgedEllipse (GVJ_t *job, pointf *pf, char *clrs)
 
int stripedBox (GVJ_t *job, pointf *AF, 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 segitem_tappendSeg (pointf p, segitem_t *lp)
 
static void map_bspline_poly (pointf **pbs_p, size_t **pbs_n, size_t *pbs_poly_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 (pointf **pbs, size_t **pbs_n, size_t *pbs_poly_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 (char *pencolor, 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, char *colors, size_t num, 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 (exdot_op *op)
 
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 (char *colorlist, char *clrs[2], double *frac)
 

Variables

static char * defaultlinestyle [3] = { "solid\0", "setlinewidth\0001\0", 0 }
 
static char * saved_color_scheme
 
static 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 47 of file emit.c.

◆ FINISH

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

Definition at line 3910 of file emit.c.

◆ FIRST_SEG

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

Definition at line 814 of file emit.c.

◆ FUNLIMIT

#define FUNLIMIT   64

Definition at line 3712 of file emit.c.

◆ FUZZ

#define FUZZ   3

Definition at line 46 of file emit.c.

◆ HW

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

Definition at line 747 of file emit.c.

◆ INIT_SEG

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

Definition at line 815 of file emit.c.

◆ MARK_FIRST_SEG

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

Definition at line 813 of file emit.c.

◆ NotFirstPage

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

Definition at line 3311 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 45 of file emit.c.

◆ SEP

#define SEP   2.0

◆ SID

#define SID   1

Definition at line 3673 of file emit.c.

◆ THIN_LINE

#define THIN_LINE   0.5

Definition at line 546 of file emit.c.

Typedef Documentation

◆ radfunc_t

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

Definition at line 2136 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 817 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 857 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 1986 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 3787 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 caller graph for this function:

◆ bisect()

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

Definition at line 877 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 2156 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 754 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 356 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 1135 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 1690 of file emit.c.

References agattr(), 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 1908 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 1921 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 1411 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 ( char *  pencolor,
char *  deflt 
)
static

Definition at line 1970 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 2403 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 1670 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 1942 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 1540 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 3467 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 2423 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 3291 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 3151 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 3486 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_activefillcolor, G_activepencolor, G_deletedfillcolor, G_deletedpencolor, G_gradientangle, G_penwidth, G_peripheries, G_visitedfillcolor, G_visitedpencolor, 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(), late_nnstring(), NULL, 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 3173 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 2749 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()

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

Definition at line 2176 of file emit.c.

References agget(), arrow_gen(), color(), computeoffset_p(), computeoffset_qr(), DEFAULT_ACTIVEFILLCOLOR, DEFAULT_ACTIVEPENCOLOR, DEFAULT_COLOR, DEFAULT_DELETEDFILLCOLOR, DEFAULT_DELETEDPENCOLOR, default_pencolor(), DEFAULT_SELECTEDFILLCOLOR, DEFAULT_SELECTEDPENCOLOR, DEFAULT_VISITEDFILLCOLOR, DEFAULT_VISITEDPENCOLOR, E_activefillcolor, E_activepencolor, E_arrowsz, E_color, E_deletedfillcolor, E_deletedpencolor, E_fillcolor, E_selectedfillcolor, E_selectedpencolor, E_visitedfillcolor, E_visitedpencolor, ED_gui_state, ED_spl, bezier::eflag, EMIT_HDRAW, EMIT_TDRAW, bezier::ep, free(), free_stroke(), GUI_STATE_ACTIVE, GUI_STATE_DELETED, GUI_STATE_SELECTED, GUI_STATE_VISITED, gv_calloc(), gv_strdup(), gvrender_beziercurve(), gvrender_polygon(), gvrender_set_fillcolor(), gvrender_set_pencolor(), gvrender_set_style(), late_double(), late_nnstring(), late_string(), bezier::list, splines::list, multicolor(), NULL, stroke_t::nvertices, GVJ_s::obj, segitem_s::p, obj_state_s::penwidth, penwidth, SEP, setColorScheme(), bezier::sflag, bezier::size, splines::size, bezier::sp, streq(), taper(), taperfun(), stroke_t::vertices, pointf_s::x, and pointf_s::y.

Referenced by emit_edge().

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

◆ 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 2600 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(), lbl, map_label(), NULL, GVJ_s::obj, 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 3481 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 3305 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 1857 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 3390 of file emit.c.

References agattr(), 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 648 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 1869 of file emit.c.

References agnameof(), agraphof(), GVJ_s::clip, GVC_s::common, emit_begin_node(), emit_end_node(), emit_label(), EMIT_NLABEL, gvc, GVJ_s::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 3449 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 3459 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 3228 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, gvc, GVJ_s::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 2795 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 ( char *  colorlist,
char *  clrs[2],
double *  frac 
)

Definition at line 4038 of file emit.c.

References agwarningf(), colorseg_t::color, freeSegs(), gv_calloc(), colorseg_t::hasFraction, NULL, colorsegs_t::numc, parseSegs(), colorsegs_t::segs, and colorseg_t::t.

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 1179 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 1360 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 2138 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 2132 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 ( exdot_op op)
static

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

◆ freeSegs()

static void freeSegs ( colorsegs_t segs)
static

Definition at line 413 of file emit.c.

References colorsegs_t::base, free(), and colorsegs_t::segs.

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

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 198 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 ( char *  s)
static

Definition at line 424 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 3888 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 3868 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 3838 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 3847 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 2934 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 3046 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 3022 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, gvc, GVJ_s::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 3003 of file emit.c.

References DEFAULT_GRAPH_PAD, gvrender_features_t::default_pad, gvplugin_active_render_s::features, GVC_s::graph_sets_pad, gvc, GVJ_s::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 1245 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, gvc, GVJ_s::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 3069 of file emit.c.

References agfindnode, agget(), GVC_s::bb, GVJ_s::bb, GVJ_s::focus, free(), GD_drawing, gv_alloc(), gvc, GVJ_s::gvc, boxf::LL, ND_coord, NULL, GVJ_s::pad, Agraph_s::root, GVC_s::rotation, GVJ_s::rotation, str, boxf::UR, GVJ_s::view, pointf_s::x, X, pointf_s::y, 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 1147 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 3812 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 55 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 151 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, lbl, 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 309 of file emit.c.

References agget(), agxbfree(), free(), getObjId(), id, initMapData(), lbl, 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 248 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 981 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 3660 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 713 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 703 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 991 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 186 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 ( pointf **  pbs_p,
size_t **  pbs_n,
size_t *  pbs_poly_n,
size_t  n,
pointf p1,
pointf p2 
)
static

Definition at line 828 of file emit.c.

References gv_recalloc(), and last.

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 674 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 ( pointf **  pbs,
size_t **  pbs_n,
size_t *  pbs_poly_n,
bezier bp,
double  w2 
)
static

Definition at line 939 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 331 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 895 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,
char *  colors,
size_t  num,
double  arrowsize,
double  penwidth 
)
static

Definition at line 2056 of file emit.c.

References AEQ0, agerr(), aghead, agisdirected(), agnameof(), AGPREV, agraphof(), agtail, arrow_gen(), colorseg_t::color, ED_spl, bezier::eflag, EMIT_HDRAW, EMIT_TDRAW, bezier::ep, free(), freeSegs(), gvrender_beziercurve(), gvrender_set_fillcolor(), gvrender_set_pencolor(), gvrender_set_style(), left, bezier::list, NULL, parseSegs(), penwidth, colorsegs_t::segs, 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 1209 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 1373 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 1708 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 1648 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 2659 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 2148 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 1169 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 1220 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 1093 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 1065 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 3721 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 ( char *  clrs,
size_t  nseg,
colorsegs_t psegs 
)
static

Definition at line 463 of file emit.c.

References AEQ0, agerrorf(), agwarningf(), colorsegs_t::base, color(), del(), delta, freeSegs(), getSegLen(), gv_calloc(), gv_strdup(), left, NULL, colorsegs_t::numc, and colorsegs_t::segs.

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 734 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 119 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 291 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:

◆ ptsBB()

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

Definition at line 2803 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 95 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 2143 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 1006 of file emit.c.

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

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 1045 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 1595 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 2002 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,
char *  clrs,
int  rotate 
)

Definition at line 604 of file emit.c.

References color(), DEFAULT_COLOR, FILL, freeSegs(), gvrender_polygon(), gvrender_set_fillcolor(), gvrender_set_penwidth(), NULL, GVJ_s::obj, parseSegs(), obj_state_s::penwidth, rotate(), colorsegs_t::segs, 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 3685 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 2164 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 2826 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 762 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 1204 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 1365 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,
char *  clrs 
)

Definition at line 558 of file emit.c.

References color(), ellipticWedge(), freePath(), freeSegs(), 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, colorsegs_t::segs, 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 1385 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 1398 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

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

Definition at line 2792 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 92 of file emit.c.

Referenced by init_gvc().

◆ gvdevice_callbacks

gvdevice_callbacks_t gvdevice_callbacks
extern

Definition at line 540 of file gvevent.c.

Referenced by gvRenderJobs().

◆ gvevent_key_binding

gvevent_key_binding_t gvevent_key_binding[]
extern

Definition at line 520 of file gvevent.c.

Referenced by gvRenderJobs().

◆ gvevent_key_binding_size

const size_t gvevent_key_binding_size
extern

Definition at line 537 of file gvevent.c.

Referenced by gvRenderJobs().

◆ saved_color_scheme

char* saved_color_scheme
static

Definition at line 1713 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 3444 of file emit.c.

Referenced by emit_once().

◆ strings

Dict_t* strings
static

Definition at line 3443 of file emit.c.

Referenced by emit_once(), and emit_once_reset().