Graphviz 12.0.1~dev.20240715.2254
Loading...
Searching...
No Matches
utils.h File Reference
#include "config.h"
#include <cgraph/agxbuf.h>
#include <stdbool.h>
#include <stddef.h>
Include dependency graph for utils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  xml_flags_t
 

Functions

pointf Bezier (pointf *, double, pointf *, pointf *)
 
void attach_attrs_and_arrows (graph_t *, bool *, bool *)
 
int xml_escape (const char *s, xml_flags_t flags, int(*cb)(void *state, const char *s), void *state)
 
void write_plain (GVJ_t *job, graph_t *g, FILE *f, bool extend)
 
double yDir (double y)
 
char * ps_string (char *s, int)
 
char * strdup_and_subst_obj (char *str, void *obj)
 
void epsf_emit_body (GVJ_t *job, usershape_t *us)
 
void epsf_define (GVJ_t *job)
 
void undoClusterEdges (graph_t *g)
 
Dt_tmkClustMap (Agraph_t *g)
 
Agraph_tfindCluster (Dt_t *map, char *name)
 
attrsym_tsafe_dcl (graph_t *g, int obj_kind, char *name, char *defaultValue)
 
int late_int (void *obj, Agsym_t *attr, int defaultValue, int minimum)
 
double late_double (void *obj, Agsym_t *attr, double defaultValue, double minimum)
 
char * late_nnstring (void *obj, Agsym_t *attr, char *defaultValue)
 
char * late_string (void *obj, Agsym_t *attr, char *defaultValue)
 
bool late_bool (void *obj, Agsym_t *attr, bool defaultValue)
 
double get_inputscale (graph_t *g)
 
Agnode_tUF_find (Agnode_t *)
 
Agnode_tUF_union (Agnode_t *, Agnode_t *)
 
void UF_singleton (Agnode_t *)
 
void UF_setname (Agnode_t *, Agnode_t *)
 
const char * safefile (const char *filename)
 
bool mapBool (const char *p, bool defaultValue)
 
bool mapbool (const char *p)
 
int maptoken (char *, char **, int *)
 
bool findStopColor (char *colorlist, char *clrs[2], double *frac)
 
int test_toggle (void)
 
void common_init_node (node_t *n)
 
void common_init_edge (edge_t *e)
 
void updateBB (graph_t *g, textlabel_t *lp)
 
void compute_bb (Agraph_t *)
 
boxf polyBB (polygon_t *poly)
 
bool overlap_node (node_t *n, boxf b)
 
bool overlap_label (textlabel_t *lp, boxf b)
 
bool overlap_edge (edge_t *e, boxf b)
 
void get_gradient_points (pointf *A, pointf *G, size_t n, double angle, int flags)
 
void processClusterEdges (graph_t *g)
 
char * latin1ToUTF8 (char *)
 Converts string from Latin1 encoding to utf8. Also translates HTML entities.
 
char * htmlEntityUTF8 (char *, graph_t *g)
 
char * utf8ToLatin1 (char *ins)
 
char * scanEntity (char *t, agxbuf *xb)
 
pointf dotneato_closest (splines *spl, pointf p)
 
Agsym_tsetAttr (graph_t *, void *, char *name, char *value, Agsym_t *)
 
void setEdgeType (graph_t *g, int defaultValue)
 
bool is_a_cluster (Agraph_t *g)
 
void gv_nodesize (Agnode_t *n, bool flip)
 
double drand48 (void)
 
void start_timer (void)
 
double elapsed_sec (void)
 
void cat_libfile (GVJ_t *job, const char **arglib, const char **stdlib)
 

Function Documentation

◆ attach_attrs_and_arrows()

void attach_attrs_and_arrows ( graph_t g,
bool *  sp,
bool *  ep 
)

Definition at line 229 of file output.c.

References AGEDGE, agfstnode(), agfstout(), agget(), AGNODE, agnxtnode(), agnxtout(), AGRAPH, agset(), agxbfree(), agxbpop(), agxbprint(), agxbputc(), agxbuse(), agxset(), ED_edge_type, ED_head_label, ED_label, ED_spl, ED_tail_label, ED_xlabel, EDGE_LABEL, EDGE_XLABEL, GD_has_labels, GD_odim, GRAPH_LABEL, gv_fixLocale(), GVSPLINES, HAS_CLUST_EDGE, HEAD_LABEL, IGNORED, isPolygon(), M_PI, N_height, N_vertices, N_width, ND_coord, ND_height, ND_ht, ND_lw, ND_pos, ND_rw, ND_shape, ND_shape_info, ND_width, ND_xlabel, NODE_XLABEL, NULL, POINTS_PER_INCH, PS2INCH, rec_attach_bb(), safe_dcl(), set_record_rects(), setYInvert(), State, TAIL_LABEL, undoClusterEdges(), pointf_s::x, pointf_s::y, YDIR, and YFDIR.

Referenced by attach_attrs(), and dot_begin_graph().

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

◆ Bezier()

pointf Bezier ( pointf V,
double  t,
pointf Left,
pointf Right 
)

Definition at line 169 of file utils.c.

◆ cat_libfile()

void cat_libfile ( GVJ_t job,
const char **  arglib,
const char **  stdlib 
)

Definition at line 134 of file psusershape.c.

References agwarningf(), gvputs(), gvwrite(), and safefile().

Referenced by lasi_begin_graph(), lasi_end_page(), psgen_begin_graph(), and psgen_end_page().

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

◆ common_init_edge()

void common_init_edge ( edge_t e)

Definition at line 505 of file utils.c.

References agget(), aghead, aghtmlstr(), agraphof(), agtail, agxget(), chkPort(), E_headclip, E_headlabel, E_label, E_label_float, E_tailclip, E_taillabel, E_xlabel, ED_head_label, ED_head_port, ED_label, ED_label_ontop, ED_tail_label, ED_tail_port, ED_xlabel, EDGE_LABEL, EDGE_XLABEL, fontinfo::fontcolor, fontinfo::fontname, fontinfo::fontsize, GD_has_labels, HEAD_ID, HEAD_LABEL, initFontEdgeAttr(), initFontLabelEdgeAttr(), late_string(), LT_HTML, LT_NONE, make_label(), mapbool(), ND_has_port, ND_shape, noClip(), NULL, str, TAIL_ID, and TAIL_LABEL.

Referenced by circular_init_edge(), cluster_init_graph(), dot_init_edge(), init_edge(), init_node_edge(), neato_init_edge(), sfdp_init_edge(), and twopi_init_edge().

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

◆ common_init_node()

void common_init_node ( node_t n)

Definition at line 422 of file utils.c.

References aghtmlstr(), agraphof(), agxget(), bind_shape(), DEFAULT_COLOR, DEFAULT_FONTNAME, DEFAULT_FONTSIZE, DEFAULT_NODEHEIGHT, DEFAULT_NODESHAPE, DEFAULT_NODEWIDTH, fontinfo::fontcolor, fontinfo::fontname, fontinfo::fontsize, GD_has_labels, imin(), late_double(), late_int(), late_nnstring(), LT_HTML, LT_NONE, LT_RECD, make_label(), MIN_FONTSIZE, MIN_NODEHEIGHT, MIN_NODEWIDTH, N_fontcolor, N_fontname, N_fontsize, N_height, N_label, N_shape, N_showboxes, N_width, N_xlabel, ND_height, ND_label, ND_shape, ND_showboxes, ND_width, ND_xlabel, NODE_XLABEL, SH_RECORD, shapeOf(), and str.

Referenced by dot_init_node(), finishNode(), init_node(), and neato_init_node().

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

◆ compute_bb()

void compute_bb ( graph_t g)

Compute bounding box of g using nodes, splines, and clusters. Assumes bb of clusters already computed. store in GD_bb.

Definition at line 629 of file utils.c.

References add_pointf(), addLabelBB(), AGDATA, agfstnode(), agfstout(), agnnodes(), agnxtnode(), agnxtout(), B2BF, coord(), ED_head_label, ED_label, ED_spl, ED_tail_label, ED_xlabel, EXPANDBB, EXPANDBP, GD_bb, GD_clust, GD_flip, GD_label, GD_n_cluster, boxf::LL, ND_xlabel, ND_xsize, ND_ysize, sub_pointf(), boxf::UR, pointf_s::x, and pointf_s::y.

Referenced by doEdges(), init_nop(), layout(), neato_layout(), packSubgraphs(), polyGraphs(), putGraphs(), and spline_edges().

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

◆ dotneato_closest()

pointf dotneato_closest ( splines spl,
pointf  p 
)

Definition at line 341 of file utils.c.

References Bezier(), DIST2, bezier::list, splines::list, NULL, bezier::size, splines::size, SIZE_MAX, pointf_s::x, and pointf_s::y.

Referenced by edgeMidpoint(), and emit_attachment().

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

◆ drand48()

double drand48 ( void  )

Definition at line 1570 of file utils.c.

Referenced by eval(), generateRandomOrdering(), initLayout(), initPositions(), jitter_d(), move_node(), randompos(), and stress_majorization_kD_mkernel().

Here is the caller graph for this function:

◆ elapsed_sec()

double elapsed_sec ( void  )

Definition at line 48 of file timing.c.

References DIFF_IN_SECS, GET_TIME, S, and T.

Referenced by cleanup2(), diffeq_model(), init_xdot(), majorization(), rank2(), routesplinesterm(), sgd(), shortest_path(), solve_model(), and stress_majorization_kD_mkernel().

Here is the caller graph for this function:

◆ epsf_define()

void epsf_define ( GVJ_t job)

Definition at line 207 of file psusershape.c.

References dtfirst, dtnext, EPSF_contents, epsf_emit_body(), gvprintf(), and gvputs().

Referenced by lasi_begin_graph(), and psgen_begin_graph().

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

◆ epsf_emit_body()

void epsf_emit_body ( GVJ_t job,
usershape_t us 
)

Definition at line 183 of file psusershape.c.

References usershape_s::data, and gvputc().

Referenced by core_loadimage_ps(), epsf_define(), and lasi_loadimage_ps().

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

◆ findCluster()

Agraph_t * findCluster ( Dt_t map,
char *  name 
)

Definition at line 1622 of file utils.c.

References clust_t::clp, dtmatch, and NULL.

Referenced by getCluster(), and mapc().

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:

◆ get_gradient_points()

void get_gradient_points ( pointf A,
pointf G,
size_t  n,
double  angle,
int  flags 
)

Evaluates the extreme points of an ellipse or polygon Determines the point at the center of the extreme points If isRadial is true,sets the inner radius to half the distance to the min point; else uses the angle parameter to identify two points on a line that defines the gradient direction By default, this assumes a left-hand coordinate system (for svg); if RHS = 2 flag is set, use standard coordinate system.

Definition at line 1466 of file utils.c.

References A, center(), flags, G, MAX, MIN, point::x, pointf_s::x, point::y, and pointf_s::y.

Referenced by cairo_gradient_fill(), svg_gradstyle(), and xdot_gradient_fillcolor().

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

◆ get_inputscale()

double get_inputscale ( graph_t g)

Return value for PSinputscale. If this is > 0, it has been set on the command line and this value is used. Otherwise, we check the graph's inputscale attribute. If this is not set or has a bad value, we return -1. If the value is 0, we return the default. Otherwise, we return the value. Set but negative values are treated like 0.

Definition at line 71 of file utils.c.

References agfindgraphattr, is_exactly_zero(), late_double(), POINTS_PER_INCH, and PSinputscale.

Referenced by fdp_layout(), and neato_layout().

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

◆ gv_nodesize()

void gv_nodesize ( Agnode_t n,
bool  flip 
)

Definition at line 1556 of file utils.c.

References INCH2PS, ND_height, ND_ht, ND_lw, ND_rw, and ND_width.

Referenced by dot_init_node(), init_node(), neato_init_node(), translate_drawing(), and walkTree().

Here is the caller graph for this function:

◆ htmlEntityUTF8()

char * htmlEntityUTF8 ( char *  s,
graph_t g 
)

substitute html entities like: &#123; and: & with the UTF8 equivalents check for invalid utf8. If found, treat a single byte as Latin-1, convert it to utf8 and warn the user.

Definition at line 1199 of file utils.c.

References agnameof(), agwarningf(), agxbdisown(), agxbputc(), cvtAndAppend(), and htmlEntity().

Referenced by make_html_label(), make_label(), and preprocessTooltip().

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

◆ is_a_cluster()

bool is_a_cluster ( Agraph_t g)

Definition at line 691 of file utils.c.

References agget(), agnameof(), mapbool(), and Agraph_s::root.

Referenced by cloneSubg(), cntCluster(), compile_clusters(), compile_samerank(), deriveClusters(), is_cluster(), projectG(), and subgInduce().

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

◆ late_bool()

bool late_bool ( void *  obj,
Agsym_t attr,
bool  defaultValue 
)

Definition at line 91 of file utils.c.

References agxget(), mapbool(), and NULL.

Referenced by addXLabels(), find_blocks(), and getAttrBool().

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

◆ late_double()

double late_double ( void *  obj,
Agsym_t attr,
double  defaultValue,
double  minimum 
)

◆ late_int()

int late_int ( void *  obj,
Agsym_t attr,
int  defaultValue,
int  minimum 
)

◆ late_nnstring()

char * late_nnstring ( void *  obj,
Agsym_t attr,
char *  defaultValue 
)

Definition at line 84 of file utils.c.

References late_string().

Referenced by checkStyle(), common_init_node(), do_graph_label(), emit_clusters(), emit_edge_graphics(), findCharset(), findFillDflt(), init_gvc(), initFontEdgeAttr(), initFontLabelEdgeAttr(), isFilled(), penColor(), point_gencode(), poly_gencode(), and write_plain().

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

◆ late_string()

char * late_string ( void *  obj,
Agsym_t attr,
char *  defaultValue 
)

Definition at line 78 of file utils.c.

References agxget().

Referenced by clust_in_layer(), common_init_edge(), do_ordering_for_nodes(), dot_init_edge(), edge_in_layer(), emit_edge(), emit_edge_graphics(), emit_end_edge(), emit_graph(), emit_node(), getAttrStr(), getRankseps(), graph_init(), late_nnstring(), node_in_layer(), ordered_edges(), poly_gencode(), poly_init(), and record_init().

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

◆ latin1ToUTF8()

char * latin1ToUTF8 ( char *  s)

Definition at line 1278 of file utils.c.

References agxbdisown(), agxbputc(), and htmlEntity().

Referenced by cvtAndAppend(), make_html_label(), make_label(), preprocessTooltip(), and stoj().

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

◆ mapbool()

bool mapbool ( const char *  p)

Definition at line 336 of file utils.c.

◆ mapBool()

bool mapBool ( const char *  p,
bool  defaultValue 
)

Definition at line 320 of file utils.c.

References gv_isdigit().

Referenced by getAdjustMode(), mapbool(), and tuneControl().

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

◆ maptoken()

int maptoken ( char *  p,
char **  name,
int *  val 
)

Definition at line 310 of file utils.c.

References streq().

Referenced by graph_init(), and rank_set_class().

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

◆ mkClustMap()

Dt_t * mkClustMap ( Agraph_t g)

Generates a dictionary mapping cluster names to corresponding cluster. Used with cgraph as the latter does not support a flat namespace of clusters. Assumes G has already built a cluster tree using GD_n_cluster and GD_clust.

Definition at line 1612 of file utils.c.

References dtopen(), Dtoset, fillMap(), and strDisc.

Referenced by dot_compoundEdges(), and processClusterEdges().

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

◆ overlap_edge()

bool overlap_edge ( edge_t e,
boxf  b 
)

Definition at line 1378 of file utils.c.

References splines::bb, boxf_overlap(), ED_label, ED_spl, splines::list, overlap_bezier(), overlap_label(), and splines::size.

Referenced by gvevent_find_obj().

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

◆ overlap_label()

bool overlap_label ( textlabel_t lp,
boxf  b 
)

Definition at line 1341 of file utils.c.

References add_pointf(), textlabel_t::dimen, boxf::LL, OVERLAP, textlabel_t::pos, sub_pointf(), pointf_s::x, and pointf_s::y.

Referenced by edge_in_box(), and overlap_edge().

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

◆ overlap_node()

bool overlap_node ( node_t n,
boxf  b 
)

Definition at line 1329 of file utils.c.

References boxf::LL, mid_pointf(), inside_t::n, ND_bb, ND_coord, ND_shape, OVERLAP, inside_t::s, sub_pointf(), and boxf::UR.

Referenced by gvevent_find_obj().

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

◆ polyBB()

boxf polyBB ( polygon_t poly)

Compute the bounding box of a polygon. We only need to use the outer periphery.

Definition at line 600 of file utils.c.

References boxf::LL, MAX, MIN, boxf::UR, pointf_s::x, and pointf_s::y.

Referenced by makeObstacle(), and poly_inside().

Here is the caller graph for this function:

◆ processClusterEdges()

void processClusterEdges ( graph_t g)

Look for cluster edges. Replace cluster edge endpoints corresponding to a cluster with special cluster nodes. Delete original nodes. If cluster edges are found, a cl_edge_t record will be attached to the graph, containing the count of such edges.

Definition at line 936 of file utils.c.

References agbindrec(), agclose(), agdelete(), agfstnode(), agfstout(), agnxtnode(), agnxtout(), agsubg(), agxbfree(), checkCompound(), CL_EDGE_TAG, dtclose(), dtopen(), Dtoset, IS_CLUST_NODE, mapDisc, mkClustMap(), and cl_edge_t::n_cluster_edges.

Referenced by fdp_init_node_edge().

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

◆ ps_string()

char * ps_string ( char *  s,
int  chset 
)

Definition at line 253 of file psusershape.c.

References agwarningf(), agxbputc(), agxbuse(), ASCII, CHAR_LATIN1, CHAR_UTF8, charsetOf(), free(), ins(), LATIN1, LPAREN, NONLATIN, RPAREN, and utf8ToLatin1().

Referenced by lasi_begin_anchor(), lasi_begin_graph(), psgen_begin_anchor(), psgen_begin_graph(), and psgen_textspan().

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

◆ safe_dcl()

attrsym_t * safe_dcl ( graph_t g,
int  obj_kind,
char *  name,
char *  defaultValue 
)

Find the attribute belonging to graph g for objects like obj with given name. If one does not exist, create it with the default value defaultValue.

Definition at line 1070 of file utils.c.

References agattr(), and NULL.

Referenced by attach_attrs_and_arrows(), xdot_begin_graph(), and xdot_end_graph().

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

◆ safefile()

const char * safefile ( const char *  filename)

Definition at line 259 of file utils.c.

References agwarningf(), DIRSEP, findPath(), free(), Gvfilepath, Gvimagepath, HTTPServerEnVar, mkDirlist(), NULL, onetime, and str.

Referenced by bind_shape(), cat_libfile(), epsf_init(), and gvusershape_file_access().

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

◆ scanEntity()

char * scanEntity ( char *  t,
agxbuf xb 
)

Scan non-numeric entity, convert to &#...; form and store in xbuf. t points to first char after '&'. Return after final semicolon. If unknown, we return t and let libexpat flag the error.

Definition at line 1087 of file utils.c.

References agxbprint(), agxbputc(), comp_entities(), entities, len(), MAXENTLEN, NR_OF_ENTITIES, and entities_s::value.

Here is the call graph for this function:

◆ setAttr()

Agsym_t * setAttr ( graph_t g,
void *  obj,
char *  name,
char *  value,
Agsym_t ap 
)

Sets object's name attribute to the given value. Creates the attribute if not already set.

Definition at line 700 of file utils.c.

References agattr(), AGEDGE, AGNODE, agobjkind(), AGRAPH, agxset(), and NULL.

Referenced by clustNode().

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

◆ setEdgeType()

void setEdgeType ( graph_t g,
int  defaultValue 
)

Sets graph's edge type based on the "splines" attribute. If the attribute is not defined, use defaultValue. If the attribute is "", use NONE. If attribute value matches (case indepedent), use match. ortho => EDGETYPE_ORTHO none => EDGETYPE_NONE line => EDGETYPE_LINE polyline => EDGETYPE_PLINE spline => EDGETYPE_SPLINE If attribute is boolean, true means EDGETYPE_SPLINE, false means EDGETYPE_LINE. Else warn and use default.

Definition at line 1443 of file utils.c.

References agget(), edgeType(), EDGETYPE_NONE, and GD_flags.

Referenced by circo_init_graph(), cluster_init_graph(), dotLayout(), fdp_init_graph(), make_flat_adj_edges(), neato_init_graph(), neato_layout(), patchwork_init_graph(), sfdp_init_graph(), sfdp_layout(), and twopi_init_graph().

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

◆ start_timer()

void start_timer ( void  )

Definition at line 43 of file timing.c.

References GET_TIME, and T.

Referenced by diffeq_model(), gvRenderJobs(), init_mincross(), init_xdot(), kkNeato(), majorization(), rank2(), routesplinesinit(), sgd(), shortest_path(), and stress_majorization_kD_mkernel().

Here is the caller graph for this function:

◆ strdup_and_subst_obj()

char * strdup_and_subst_obj ( char *  str,
void *  obj 
)

Definition at line 385 of file labels.c.

References str, and strdup_and_subst_obj0().

Referenced by emit_begin_edge(), graph_init(), gv_edge_state(), gv_graph_state(), gv_node_state(), gvevent_enter_obj(), initMapData(), size_html_txt(), and svg_begin_edge().

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

◆ test_toggle()

int test_toggle ( void  )

Definition at line 411 of file utils.c.

References Tflag.

Referenced by move_node().

Here is the caller graph for this function:

◆ UF_find()

Agnode_t * UF_find ( Agnode_t n)

Definition at line 99 of file utils.c.

References ND_UF_parent.

Referenced by class1(), class2(), decompose(), expand_ranksets(), interclust1(), leader_of(), minmax_edges(), minmax_edges2(), search_component(), UF_setname(), and UF_union().

Here is the caller graph for this function:

◆ UF_setname()

void UF_setname ( Agnode_t u,
Agnode_t v 
)

Definition at line 144 of file utils.c.

References ND_UF_parent, ND_UF_size, and UF_find().

Referenced by mark_clusters().

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

◆ UF_singleton()

void UF_singleton ( Agnode_t u)

Definition at line 137 of file utils.c.

References ND_ranktype, ND_UF_parent, ND_UF_size, NORMAL, and NULL.

Referenced by expand_ranksets(), and mark_clusters().

Here is the caller graph for this function:

◆ UF_union()

Agnode_t * UF_union ( Agnode_t u,
Agnode_t v 
)

Definition at line 109 of file utils.c.

References ND_id, ND_UF_parent, ND_UF_size, NULL, and UF_find().

Referenced by cluster_leader(), and collapse_rankset().

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

◆ undoClusterEdges()

void undoClusterEdges ( graph_t g)

Replace cluster nodes with originals. Make sure original has no attributes. Replace original edges. Delete cluster nodes, which will also delete cluster edges.

Definition at line 1035 of file utils.c.

References agbindrec(), agclose(), agdelete(), agfstnode(), agfstout(), agnxtnode(), agnxtout(), agsubg(), ED_compound, free(), gv_calloc(), gv_cleanup_node(), num_clust_edges(), and undoCompound().

Referenced by attach_attrs_and_arrows(), and dot_begin_graph().

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

◆ updateBB()

void updateBB ( graph_t g,
textlabel_t lp 
)

Reset graph's bounding box to include bounding box of the given label. Assume the label's position has been set.

Definition at line 620 of file utils.c.

References addLabelBB(), GD_bb, and GD_flip.

Referenced by addXLabels(), dot_splines_(), make_flat_adj_edges(), makePortLabels(), makeSelfArcs(), and setEdgeLabelPos().

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

◆ utf8ToLatin1()

char * utf8ToLatin1 ( char *  s)

Converts string from utf8 encoding to Latin1 Note that it does not attempt to reproduce HTML entities. We assume the input string comes from latin1ToUTF8.

Definition at line 1311 of file utils.c.

References agxbdisown(), and agxbputc().

Referenced by ps_string().

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

◆ write_plain()

void write_plain ( GVJ_t job,
graph_t g,
FILE *  f,
bool  extend 
)

Definition at line 114 of file output.c.

References agcanonStr(), agfstnode(), agfstout(), agget(), aghead, agnameof(), agnxtnode(), agnxtout(), agputc(), agputs(), agraphof(), agtail, agxget(), canon(), Agraph_s::clos, DEFAULT_COLOR, DEFAULT_FILL, Agclos_s::disc, E_color, E_style, ED_label, ED_spl, GD_bb, Agdisc_s::io, IS_CLUST_NODE, late_nnstring(), lbl, bezier::list, N_color, N_fillcolor, N_label, N_style, ND_coord, ND_height, ND_label, ND_shape, ND_width, NULL, printdouble(), printint(), printpoint(), printstring(), PS2INCH, Agiodisc_s::putstr, setYInvert(), bezier::size, str, writenodeandport(), pointf_s::x, pointf_s::y, and GVJ_s::zoom.

Referenced by dot_end_graph().

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

◆ xml_escape()

int xml_escape ( const char *  s,
xml_flags_t  flags,
int(*)(void *state, const char *s cb,
void *  state 
)

XML-escape a string

Parameters
sSource string to process.
flagsOptions of how to configure escaping.
cbAn fputs analogue for emitting escaped output.
stateCaller-defined data to pass to cb.
Returns
The first negative value cb returns or the last return value of cb.

Definition at line 179 of file xml.c.

References flags, state, and xml_core().

Referenced by EmbedText(), gvputs_xml(), pango_textlayout(), svg_begin_anchor(), svg_textspan(), xml_puts(), xml_puts(), xml_url_puts(), and xml_url_puts().

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

◆ yDir()

double yDir ( double  y)

Definition at line 28 of file output.c.

References YDIR.

Referenced by xdot_point().

Here is the caller graph for this function: