Graphviz 13.1.3~dev.20250905.1412
Loading...
Searching...
No Matches
dotsplines.c File Reference
#include <assert.h>
#include <common/boxes.h>
#include <dotgen/dot.h>
#include <math.h>
#include <stdatomic.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <util/agxbuf.h>
#include <util/alloc.h>
#include <util/gv_math.h>
#include <util/list.h>
Include dependency graph for dotsplines.c:

Go to the source code of this file.

Data Structures

struct  spline_info_t
 
struct  attr_state_t
 

Macros

#define NSUB   9 /* number of subdivisions, re-aiming splines */
 
#define MINW   16 /* minimum width of a box in the edge path */
 
#define HALFMINW   8
 
#define FWDEDGE   16
 
#define BWDEDGE   32
 
#define MAINGRAPH   64
 
#define AUXGRAPH   128
 
#define GRAPHTYPEMASK   192 /* the OR of the above */
 
#define LBL_SPACE   6 /* space between labels, in points */
 
#define REAL_CLUSTER(n)   (ND_clust(n) == g ? NULL : ND_clust(n))
 
#define FUDGE   4
 

Functions

static void makefwdedge (edge_t *new, edge_t *old)
 
typedef LIST (pointf)
 
static bool spline_merge (node_t *n)
 
static bool swap_ends_p (edge_t *e)
 
int portcmp (port p0, port p1)
 
static void swap_bezier (bezier *b)
 
static void swap_spline (splines *s)
 
static void edge_normalize (graph_t *g)
 
static void resetRW (graph_t *g)
 
static void setEdgeLabelPos (graph_t *g)
 
static int dot_splines_ (graph_t *g, int normalize)
 
int dot_splines (graph_t *g)
 
static void place_vnlabel (node_t *n)
 
static void setflags (edge_t *e, int hint1, int hint2, int f3)
 
static int edgecmp (const void *p0, const void *p1)
 
static void setState (graph_t *auxg, attr_state_t *attr_state)
 
static graph_tcloneGraph (graph_t *g, attr_state_t *attr_state)
 
static void cleanupCloneGraph (graph_t *g, attr_state_t *attr_state)
 
static node_tcloneNode (graph_t *g, node_t *orign)
 
static edge_tcloneEdge (graph_t *g, node_t *tn, node_t *hn, edge_t *orig)
 
static pointf transformf (pointf p, pointf del, int flip)
 rotate, if necessary, then translate points
 
static int edgelblcmpfn (const void *x, const void *y)
 
static void makeSimpleFlatLabels (node_t *tn, node_t *hn, edge_t **edges, unsigned ind, unsigned cnt, int et, unsigned n_lbls)
 
static void makeSimpleFlat (node_t *tn, node_t *hn, edge_t **edges, unsigned ind, unsigned cnt, int et)
 
static int make_flat_adj_edges (graph_t *g, edge_t **edges, unsigned ind, unsigned cnt, edge_t *e0, int et)
 
static void makeFlatEnd (graph_t *g, const spline_info_t sp, path *P, node_t *n, edge_t *e, pathend_t *endp, bool isBegin)
 
static void makeBottomFlatEnd (graph_t *g, const spline_info_t sp, path *P, node_t *n, edge_t *e, pathend_t *endp, bool isBegin)
 
static void make_flat_labeled_edge (graph_t *g, const spline_info_t sp, path *P, edge_t *e, int et)
 
static void make_flat_bottom_edges (graph_t *g, const spline_info_t sp, path *P, edge_t **edges, unsigned ind, unsigned cnt, edge_t *e, bool use_splines)
 
static int make_flat_edge (graph_t *g, const spline_info_t sp, path *P, edge_t **edges, unsigned ind, unsigned cnt, int et)
 
static bool leftOf (pointf p1, pointf p2, pointf p3)
 Return true if p3 is to left of ray p1->p2.
 
static int makeLineEdge (graph_t *g, edge_t *fe, points_t *points, node_t **hp)
 
static void make_regular_edge (graph_t *g, spline_info_t *sp, path *P, edge_t **edges, unsigned ind, unsigned cnt, int et)
 
static void completeregularpath (path *P, edge_t *first, edge_t *last, pathend_t *tendp, pathend_t *hendp, const boxes_t *boxes)
 
static boxf makeregularend (boxf b, int side, double y)
 
static void adjustregularpath (path *P, size_t fb, size_t lb)
 
static boxf rank_box (spline_info_t *sp, graph_t *g, int r)
 
static int straight_len (node_t *n)
 
static edge_tstraight_path (edge_t *e, int cnt, points_t *plist)
 
static void recover_slack (edge_t *e, path *p)
 
static void resize_vn (node_t *vn, double lx, double cx, double rx)
 
static edge_ttop_bound (edge_t *e, int side)
 
static edge_tbot_bound (edge_t *e, int side)
 
static bool cl_vninside (graph_t *cl, node_t *n)
 
static Agraph_tcl_bound (graph_t *g, node_t *n, node_t *adj)
 
static boxf maximal_bbox (graph_t *g, const spline_info_t sp, node_t *vn, edge_t *ie, edge_t *oe)
 
static node_tneighbor (graph_t *g, node_t *vn, edge_t *ie, edge_t *oe, int dir)
 
static bool pathscross (node_t *n0, node_t *n1, edge_t *ie1, edge_t *oe1)
 

Variables

static splineInfo sinfo
 

Macro Definition Documentation

◆ AUXGRAPH

#define AUXGRAPH   128

Definition at line 43 of file dotsplines.c.

◆ BWDEDGE

#define BWDEDGE   32

Definition at line 40 of file dotsplines.c.

◆ FUDGE

#define FUDGE   4

Definition at line 2210 of file dotsplines.c.

◆ FWDEDGE

#define FWDEDGE   16

Definition at line 39 of file dotsplines.c.

◆ GRAPHTYPEMASK

#define GRAPHTYPEMASK   192 /* the OR of the above */

Definition at line 44 of file dotsplines.c.

◆ HALFMINW

#define HALFMINW   8

Definition at line 37 of file dotsplines.c.

◆ LBL_SPACE

#define LBL_SPACE   6 /* space between labels, in points */

Definition at line 953 of file dotsplines.c.

◆ MAINGRAPH

#define MAINGRAPH   64

Definition at line 42 of file dotsplines.c.

◆ MINW

#define MINW   16 /* minimum width of a box in the edge path */

Definition at line 36 of file dotsplines.c.

◆ NSUB

#define NSUB   9 /* number of subdivisions, re-aiming splines */

Definition at line 34 of file dotsplines.c.

◆ REAL_CLUSTER

#define REAL_CLUSTER (   n)    (ND_clust(n) == g ? NULL : ND_clust(n))

Definition at line 2169 of file dotsplines.c.

Function Documentation

◆ adjustregularpath()

static void adjustregularpath ( path P,
size_t  fb,
size_t  lb 
)
static

Definition at line 2018 of file dotsplines.c.

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

Referenced by completeregularpath().

Here is the caller graph for this function:

◆ bot_bound()

static edge_t * bot_bound ( edge_t e,
int  side 
)
static

Definition at line 2141 of file dotsplines.c.

References aghead, agtail, ED_spl, ED_to_orig, ND_in, ND_order, and NULL.

Referenced by completeregularpath().

Here is the caller graph for this function:

◆ cl_bound()

static Agraph_t * cl_bound ( graph_t g,
node_t n,
node_t adj 
)
static

Definition at line 2173 of file dotsplines.c.

References aghead, agtail, cl_vninside(), ED_to_orig, ND_clust, ND_node_type, ND_out, NORMAL, NULL, and REAL_CLUSTER.

Referenced by maximal_bbox().

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

◆ cl_vninside()

static bool cl_vninside ( graph_t cl,
node_t n 
)
static

Definition at line 2159 of file dotsplines.c.

References BETWEEN, GD_bb, and ND_coord.

Referenced by cl_bound().

Here is the caller graph for this function:

◆ cleanupCloneGraph()

static void cleanupCloneGraph ( graph_t g,
attr_state_t attr_state 
)
static

Definition at line 826 of file dotsplines.c.

References agclose(), dot_cleanup(), E_constr, attr_state_t::E_constr, E_dir, attr_state_t::E_dir, E_fontcolor, attr_state_t::E_fontcolor, E_fontname, attr_state_t::E_fontname, E_fontsize, attr_state_t::E_fontsize, E_headclip, attr_state_t::E_headclip, E_headlabel, attr_state_t::E_headlabel, E_label, attr_state_t::E_label, E_label_float, attr_state_t::E_label_float, E_labelfontcolor, attr_state_t::E_labelfontcolor, E_labelfontname, attr_state_t::E_labelfontname, E_labelfontsize, attr_state_t::E_labelfontsize, E_minlen, attr_state_t::E_minlen, E_samehead, attr_state_t::E_samehead, E_sametail, attr_state_t::E_sametail, E_tailclip, attr_state_t::E_tailclip, E_taillabel, attr_state_t::E_taillabel, E_weight, attr_state_t::E_weight, E_xlabel, attr_state_t::E_xlabel, G_ordering, attr_state_t::G_ordering, N_distortion, attr_state_t::N_distortion, N_fixed, attr_state_t::N_fixed, N_fontcolor, attr_state_t::N_fontcolor, N_fontname, attr_state_t::N_fontname, N_fontsize, attr_state_t::N_fontsize, N_group, attr_state_t::N_group, N_height, attr_state_t::N_height, N_label, attr_state_t::N_label, N_nojustify, attr_state_t::N_nojustify, N_ordering, attr_state_t::N_ordering, N_orientation, attr_state_t::N_orientation, N_peripheries, attr_state_t::N_peripheries, N_shape, attr_state_t::N_shape, N_showboxes, attr_state_t::N_showboxes, N_sides, attr_state_t::N_sides, N_skew, attr_state_t::N_skew, N_style, attr_state_t::N_style, N_width, attr_state_t::N_width, N_xlabel, attr_state_t::N_xlabel, State, and attr_state_t::State.

Referenced by make_flat_adj_edges().

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

◆ cloneEdge()

static edge_t * cloneEdge ( graph_t g,
node_t tn,
node_t hn,
edge_t orig 
)
static

Definition at line 890 of file dotsplines.c.

References agbindrec(), agcopyattr(), agedge(), and NULL.

Referenced by make_flat_adj_edges().

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

◆ cloneGraph()

static graph_t * cloneGraph ( graph_t g,
attr_state_t attr_state 
)
static

Definition at line 779 of file dotsplines.c.

References agattr_html(), agattr_text(), agbindrec(), Agdirected, AGEDGE, aghtmlstr(), agisdirected(), AGNODE, agnxtattr(), agopen(), AGRAPH, agroot(), Agundirected, Agsym_s::defval, GD_charset, GD_drawing, GD_flip, GD_nodesep, GD_ranksep, gv_alloc(), Agsym_s::name, NULL, RANKDIR_LR, RANKDIR_TB, SET_RANKDIR, and setState().

Referenced by make_flat_adj_edges().

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

◆ cloneNode()

static node_t * cloneNode ( graph_t g,
node_t orign 
)
static

Definition at line 876 of file dotsplines.c.

References agbindrec(), agcopyattr(), agnameof(), agnode(), agset(), agxbfree(), agxbprint(), agxbuse(), ND_label, SH_RECORD, and shapeOf().

Referenced by make_flat_adj_edges().

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

◆ completeregularpath()

static void completeregularpath ( path P,
edge_t first,
edge_t last,
pathend_t tendp,
pathend_t hendp,
const boxes_t *  boxes 
)
static

Definition at line 1956 of file dotsplines.c.

References add_box(), adjustregularpath(), bot_bound(), pathend_t::boxes, pathend_t::boxn, getsplinepoints(), last, LIST_GET, LIST_SIZE, path::nbox, NULL, and top_bound().

Referenced by make_regular_edge().

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

◆ dot_splines()

int dot_splines ( Agraph_t g)
Returns
0 on success

Definition at line 484 of file dotsplines.c.

References dot_splines_().

Referenced by dotLayout().

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

◆ dot_splines_()

static int dot_splines_ ( graph_t g,
int  normalize 
)
static

Main spline routing code. The normalize parameter allows this function to be called by the recursive call in make_flat_edge without normalization occurring, so that the edge will only be normalized once in the top level call of dot_splines.

Returns
0 on success

Definition at line 232 of file dotsplines.c.

References agfstin(), agfstnode(), agfstout(), aghead, AGMKOUT, agnxtin(), agnxtnode(), agnxtout(), agtail, agwarningf(), AUXGRAPH, Agedge_s::base, path::boxes, BWDEDGE, cnt(), Agobj_s::data, E_headlabel, E_labelangle, E_labeldistance, E_taillabel, ED_adjacent, ED_edge_type, ED_head_label, ED_head_port, ED_label, ED_tail_label, ED_tail_port, ED_tree_index, EDGE_LABEL, edge_normalize(), EDGE_TYPE, edgecmp(), EdgeLabelsDone, EDGETYPE_CURVED, EDGETYPE_LINE, EDGETYPE_NONE, EDGETYPE_ORTHO, EDGETYPEMASK, FLATEDGE, FLATORDER, free(), FWDEDGE, GD_has_labels, GD_maxrank, GD_minrank, GD_nlist, GD_nodesep, GD_rank, gv_calloc(), GVSPLINES, Agedgeinfo_t::hdr, IGNORED, spline_info_t::LeftBound, LIST, LIST_APPEND, LIST_FREE, LIST_FRONT, LIST_GET, LIST_SIZE, LIST_SORT, MAINGRAPH, make_flat_edge(), make_regular_edge(), makefwdedge(), makeSelfEdge(), makeStraightEdges(), mark_lowclusters(), MAX, MIN, MINW, spline_info_t::Multisep, ND_alg, ND_coord, ND_flat_out, ND_ht, ND_label, ND_lw, ND_mval, ND_next, ND_node_type, ND_other, ND_out, ND_rank, ND_rw, NORMAL, normalize(), NSUB, orthoEdges(), Agedgepair_s::out, place_portlabel(), place_vnlabel(), portcmp(), spline_info_t::Rank_box, REGULAREDGE, resetRW(), spline_info_t::RightBound, Agraph_s::root, routesplinesinit(), routesplinesterm(), setEdgeLabelPos(), setflags(), sinfo, splineInfo::splineMerge, spline_info_t::Splinesep, State, SWAP, updateBB(), and VIRTUAL.

Referenced by dot_splines(), and make_flat_adj_edges().

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

◆ edge_normalize()

static void edge_normalize ( graph_t g)
static

Definition at line 171 of file dotsplines.c.

References agfstnode(), agfstout(), agnxtnode(), agnxtout(), ED_spl, sinfo, swap_spline(), and splineInfo::swapEnds.

Referenced by dot_splines_().

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

◆ edgecmp()

static int edgecmp ( const void *  p0,
const void *  p1 
)
static

Definition at line 542 of file dotsplines.c.

References aghead, AGSEQ, agtail, Agedge_s::base, BWDEDGE, Agobj_s::data, ED_head_port, ED_label, ED_tail_port, ED_tree_index, EDGETYPEMASK, FLATEDGE, GRAPHTYPEMASK, Agedgeinfo_t::hdr, makefwdedge(), ND_coord, ND_rank, Agedgepair_s::out, and portcmp().

Referenced by dot_splines_().

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

◆ edgelblcmpfn()

static int edgelblcmpfn ( const void *  x,
const void *  y 
)
static

Definition at line 913 of file dotsplines.c.

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

Referenced by makeSimpleFlatLabels().

Here is the caller graph for this function:

◆ leftOf()

static bool leftOf ( pointf  p1,
pointf  p2,
pointf  p3 
)
static

Definition at line 1660 of file dotsplines.c.

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

Referenced by edgesIntersect(), and makeLineEdge().

Here is the caller graph for this function:

◆ LIST()

typedef LIST ( pointf  )

Definition at line 70 of file dotsplines.c.

◆ make_flat_adj_edges()

static int make_flat_adj_edges ( graph_t g,
edge_t **  edges,
unsigned  ind,
unsigned  cnt,
edge_t e0,
int  et 
)
static

Definition at line 1165 of file dotsplines.c.

References agbindrec(), agedge(), agerr(), aghead, agisdirected(), agnameof(), AGPREV, agset(), agsubg(), agtail, agwarningf(), agxset(), cleanupCloneGraph(), cloneEdge(), cloneGraph(), cloneNode(), cnt(), del(), dot_init_node_edge(), dot_mincross(), dot_position(), dot_rank(), dot_sameports(), dot_splines_(), dotneato_postprocess(), E_weight, ED_alg, ED_edge_type, ED_head_port, ED_label, ED_spl, ED_tail_port, ED_to_orig, bezier::eflag, bezier::ep, GD_bb, GD_dotroot, GD_flip, GD_gvc, GD_nlist, bezier::list, makeSimpleFlat(), makeSimpleFlatLabels(), ND_coord, ND_lw, ND_next, ND_rw, new_spline(), NORMAL, NULL, setEdgeType(), bezier::sflag, SH_RECORD, shapeOf(), bezier::size, bezier::sp, SWAP, transformf(), update_bb_bz(), and updateBB().

Referenced by make_flat_edge().

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

◆ make_flat_bottom_edges()

static void make_flat_bottom_edges ( graph_t g,
const spline_info_t  sp,
path P,
edge_t **  edges,
unsigned  ind,
unsigned  cnt,
edge_t e,
bool  use_splines 
)
static

Definition at line 1456 of file dotsplines.c.

References add_box(), aghead, agtail, pathend_t::boxes, pathend_t::boxn, clip_and_install(), cnt(), free(), GD_maxrank, GD_rank, GD_ranksep, boxf::LL, makeBottomFlatEnd(), spline_info_t::Multisep, path::nbox, ND_coord, ND_rank, NULL, rank_t::pht1, rank_t::pht2, ps, routepolylines(), routesplines(), sinfo, boxf::UR, rank_t::v, pointf_s::x, and pointf_s::y.

Referenced by make_flat_edge().

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

◆ make_flat_edge()

static int make_flat_edge ( graph_t g,
const spline_info_t  sp,
path P,
edge_t **  edges,
unsigned  ind,
unsigned  cnt,
int  et 
)
static

Definition at line 1540 of file dotsplines.c.

References add_box(), aghead, agtail, Agedge_s::base, BOTTOM, pathend_t::boxes, pathend_t::boxn, BWDEDGE, clip_and_install(), cnt(), Agobj_s::data, ED_adjacent, ED_head_port, ED_label, ED_tail_port, ED_tree_index, EDGE_LABEL, EDGETYPE_LINE, EDGETYPE_SPLINE, free(), GD_has_labels, GD_rank, GD_ranksep, Agedgeinfo_t::hdr, rank_t::ht1, boxf::LL, make_flat_adj_edges(), make_flat_bottom_edges(), make_flat_labeled_edge(), makeFlatEnd(), makefwdedge(), makeSimpleFlat(), spline_info_t::Multisep, path::nbox, ND_coord, ND_rank, NULL, Agedgepair_s::out, ps, Agraph_s::root, routepolylines(), routesplines(), sinfo, TOP, boxf::UR, rank_t::v, pointf_s::x, and pointf_s::y.

Referenced by dot_splines_().

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

◆ make_flat_labeled_edge()

static void make_flat_labeled_edge ( graph_t g,
const spline_info_t  sp,
path P,
edge_t e,
int  et 
)
static

Definition at line 1352 of file dotsplines.c.

References add_box(), add_pointf(), aghead, agtail, pathend_t::boxes, pathend_t::boxn, clip_and_install(), ED_head_port, ED_label, ED_tail_port, ED_to_virt, EDGETYPE_LINE, EDGETYPE_SPLINE, free(), GD_rank, boxf::LL, makeFlatEnd(), MAX, ND_coord, ND_ht, ND_lw, ND_rank, ND_rw, points, ps, routepolylines(), routesplines(), sinfo, boxf::UR, pointf_s::x, and pointf_s::y.

Referenced by make_flat_edge().

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

◆ make_regular_edge()

static void make_regular_edge ( graph_t g,
spline_info_t sp,
path P,
edge_t **  edges,
unsigned  ind,
unsigned  cnt,
int  et 
)
static

◆ makeBottomFlatEnd()

static void makeBottomFlatEnd ( graph_t g,
const spline_info_t  sp,
path P,
node_t n,
edge_t e,
pathend_t endp,
bool  isBegin 
)
static

Definition at line 1336 of file dotsplines.c.

References beginpath(), BOTTOM, pathend_t::boxes, pathend_t::boxn, endpath(), FLATEDGE, GD_rank, boxf::LL, makeregularend(), maximal_bbox(), pathend_t::nb, ND_coord, ND_rank, NULL, pathend_t::sidemask, boxf::UR, pointf_s::x, and pointf_s::y.

Referenced by make_flat_bottom_edges().

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

◆ makeFlatEnd()

static void makeFlatEnd ( graph_t g,
const spline_info_t  sp,
path P,
node_t n,
edge_t e,
pathend_t endp,
bool  isBegin 
)
static

Definition at line 1321 of file dotsplines.c.

References beginpath(), pathend_t::boxes, pathend_t::boxn, endpath(), FLATEDGE, GD_rank, boxf::LL, makeregularend(), maximal_bbox(), pathend_t::nb, ND_coord, ND_rank, NULL, pathend_t::sidemask, TOP, boxf::UR, pointf_s::x, and pointf_s::y.

Referenced by make_flat_edge(), and make_flat_labeled_edge().

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

◆ makefwdedge()

static void makefwdedge ( edge_t new,
edge_t old 
)
static

Definition at line 46 of file dotsplines.c.

References AGHEAD, AGTAIL, Agedge_s::base, Agobj_s::data, ED_edge_type, ED_head_port, ED_tail_port, ED_to_orig, and VIRTUAL.

Referenced by dot_splines_(), edgecmp(), make_flat_edge(), and make_regular_edge().

Here is the caller graph for this function:

◆ makeLineEdge()

static int makeLineEdge ( graph_t g,
edge_t fe,
points_t *  points,
node_t **  hp 
)
static

Definition at line 1678 of file dotsplines.c.

References add_pointf(), aghead, agraphof(), agtail, ED_edge_type, ED_head_port, ED_label, ED_tail_port, ED_to_orig, EDGE_LABEL, GD_flip, GD_has_labels, leftOf(), LIST_APPEND, ND_coord, ND_rank, NORMAL, points, Agraph_s::root, pointf_s::x, and pointf_s::y.

Referenced by make_regular_edge().

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

◆ makeregularend()

static boxf makeregularend ( boxf  b,
int  side,
double  y 
)
static

Definition at line 1996 of file dotsplines.c.

References BOTTOM, boxf::LL, TOP, boxf::UR, pointf_s::x, and pointf_s::y.

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

Here is the caller graph for this function:

◆ makeSimpleFlat()

static void makeSimpleFlat ( node_t tn,
node_t hn,
edge_t **  edges,
unsigned  ind,
unsigned  cnt,
int  et 
)
static

Definition at line 1118 of file dotsplines.c.

References add_pointf(), aghead, clip_and_install(), cnt(), dy, ED_head_port, ED_tail_port, EDGETYPE_LINE, EDGETYPE_SPLINE, ND_coord, ND_ht, points, sinfo, pointf_s::x, and pointf_s::y.

Referenced by make_flat_adj_edges(), and make_flat_edge().

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

◆ makeSimpleFlatLabels()

static void makeSimpleFlatLabels ( node_t tn,
node_t hn,
edge_t **  edges,
unsigned  ind,
unsigned  cnt,
int  et,
unsigned  n_lbls 
)
static

Definition at line 960 of file dotsplines.c.

References add_pointf(), aghead, clip_and_install(), cnt(), ED_head_port, ED_label, ED_tail_port, edgelblcmpfn(), EDGETYPE_PLINE, free(), gv_calloc(), LBL_SPACE, ND_coord, ND_lw, ND_rw, NULL, points, ps, simpleSplineRoute(), sinfo, pointf_s::x, and pointf_s::y.

Referenced by make_flat_adj_edges().

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

◆ maximal_bbox()

static boxf maximal_bbox ( graph_t g,
const spline_info_t  sp,
node_t vn,
edge_t ie,
edge_t oe 
)
static

Definition at line 2212 of file dotsplines.c.

References cl_bound(), FUDGE, GD_bb, GD_nodesep, GD_rank, left, spline_info_t::LeftBound, boxf::LL, ND_coord, ND_label, ND_lw, ND_mval, ND_node_type, ND_rank, ND_rw, neighbor, NORMAL, NULL, right, spline_info_t::RightBound, spline_info_t::Splinesep, boxf::UR, VIRTUAL, pointf_s::x, and pointf_s::y.

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

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

◆ neighbor()

static node_t * neighbor ( graph_t g,
node_t vn,
edge_t ie,
edge_t oe,
int  dir 
)
static

Definition at line 2271 of file dotsplines.c.

References GD_rank, ND_label, ND_node_type, ND_order, ND_rank, NORMAL, NULL, pathscross(), rank(), and VIRTUAL.

Here is the call graph for this function:

◆ pathscross()

static bool pathscross ( node_t n0,
node_t n1,
edge_t ie1,
edge_t oe1 
)
static

Definition at line 2295 of file dotsplines.c.

References aghead, agtail, cnt(), ND_in, ND_node_type, ND_order, ND_out, and NORMAL.

Referenced by neighbor().

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

◆ place_vnlabel()

static void place_vnlabel ( node_t n)
static

Definition at line 489 of file dotsplines.c.

References agraphof(), ED_edge_type, ED_label, ED_to_orig, GD_flip, ND_coord, ND_in, ND_out, NORMAL, pointf_s::x, and pointf_s::y.

Referenced by dot_splines_(), and setEdgeLabelPos().

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

◆ portcmp()

int portcmp ( port  p0,
port  p1 
)

Definition at line 126 of file dotsplines.c.

References port::defined, port::p, pointf_s::x, and pointf_s::y.

Referenced by bothdowncandidates(), bothupcandidates(), dot_splines_(), and edgecmp().

Here is the caller graph for this function:

◆ rank_box()

static boxf rank_box ( spline_info_t sp,
graph_t g,
int  r 
)
static

Definition at line 2053 of file dotsplines.c.

References GD_rank, spline_info_t::LeftBound, boxf::LL, ND_coord, spline_info_t::Rank_box, spline_info_t::RightBound, boxf::UR, pointf_s::x, and pointf_s::y.

Referenced by make_regular_edge().

Here is the caller graph for this function:

◆ recover_slack()

static void recover_slack ( edge_t e,
path p 
)
static

Definition at line 2098 of file dotsplines.c.

References aghead, path::boxes, boxf::LL, path::nbox, ND_coord, ND_label, ND_node_type, ND_out, ND_rw, resize_vn(), sinfo, splineInfo::splineMerge, boxf::UR, VIRTUAL, pointf_s::x, and pointf_s::y.

Referenced by make_regular_edge().

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

◆ resetRW()

static void resetRW ( graph_t g)
static

Definition at line 188 of file dotsplines.c.

References agfstnode(), agnxtnode(), ND_mval, ND_other, ND_rw, and SWAP.

Referenced by dot_splines_().

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

◆ resize_vn()

static void resize_vn ( node_t vn,
double  lx,
double  cx,
double  rx 
)
static

Definition at line 2119 of file dotsplines.c.

References ND_coord, ND_lw, and ND_rw.

Referenced by recover_slack().

Here is the caller graph for this function:

◆ setEdgeLabelPos()

static void setEdgeLabelPos ( graph_t g)
static

Definition at line 202 of file dotsplines.c.

References ED_label, GD_nlist, ND_alg, ND_coord, ND_label, ND_next, ND_node_type, place_vnlabel(), textlabel_t::pos, textlabel_t::set, updateBB(), and VIRTUAL.

Referenced by dot_splines_().

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

◆ setflags()

static void setflags ( edge_t e,
int  hint1,
int  hint2,
int  f3 
)
static

Definition at line 504 of file dotsplines.c.

References aghead, agtail, BWDEDGE, ED_head_port, ED_tail_port, ED_tree_index, FLATEDGE, FWDEDGE, ND_order, ND_rank, REGULAREDGE, SELFNPEDGE, and SELFWPEDGE.

Referenced by dot_splines_().

Here is the caller graph for this function:

◆ setState()

static void setState ( graph_t auxg,
attr_state_t attr_state 
)
static

Definition at line 687 of file dotsplines.c.

References agattr_text(), AGEDGE, agfindedgeattr, agfindgraphattr, agfindnodeattr, E_constr, attr_state_t::E_constr, E_dir, attr_state_t::E_dir, E_fontcolor, attr_state_t::E_fontcolor, E_fontname, attr_state_t::E_fontname, E_fontsize, attr_state_t::E_fontsize, E_headclip, attr_state_t::E_headclip, E_headlabel, attr_state_t::E_headlabel, E_label, attr_state_t::E_label, E_label_float, attr_state_t::E_label_float, E_labelfontcolor, attr_state_t::E_labelfontcolor, E_labelfontname, attr_state_t::E_labelfontname, E_labelfontsize, attr_state_t::E_labelfontsize, E_minlen, attr_state_t::E_minlen, E_samehead, attr_state_t::E_samehead, E_sametail, attr_state_t::E_sametail, E_tailclip, attr_state_t::E_tailclip, E_taillabel, attr_state_t::E_taillabel, E_weight, attr_state_t::E_weight, E_xlabel, attr_state_t::E_xlabel, G_ordering, attr_state_t::G_ordering, N_distortion, attr_state_t::N_distortion, N_fixed, attr_state_t::N_fixed, N_fontcolor, attr_state_t::N_fontcolor, N_fontname, attr_state_t::N_fontname, N_fontsize, attr_state_t::N_fontsize, N_group, attr_state_t::N_group, N_height, attr_state_t::N_height, N_label, attr_state_t::N_label, N_nojustify, attr_state_t::N_nojustify, N_ordering, attr_state_t::N_ordering, N_orientation, attr_state_t::N_orientation, N_peripheries, attr_state_t::N_peripheries, N_shape, attr_state_t::N_shape, N_showboxes, attr_state_t::N_showboxes, N_sides, attr_state_t::N_sides, N_skew, attr_state_t::N_skew, N_style, attr_state_t::N_style, N_width, attr_state_t::N_width, N_xlabel, attr_state_t::N_xlabel, NULL, State, and attr_state_t::State.

Referenced by cloneGraph().

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

◆ spline_merge()

static bool spline_merge ( node_t n)
static

Definition at line 106 of file dotsplines.c.

References ND_in, ND_node_type, ND_out, and VIRTUAL.

Referenced by make_regular_edge().

Here is the caller graph for this function:

◆ straight_len()

static int straight_len ( node_t n)
static

Definition at line 2068 of file dotsplines.c.

References aghead, cnt(), ND_coord, ND_in, ND_node_type, ND_out, and VIRTUAL.

Referenced by make_regular_edge().

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

◆ straight_path()

static edge_t * straight_path ( edge_t e,
int  cnt,
points_t *  plist 
)
static

Definition at line 2086 of file dotsplines.c.

References aghead, cnt(), LIST_APPEND, LIST_GET, LIST_IS_EMPTY, LIST_SIZE, and ND_out.

Referenced by make_regular_edge().

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

◆ swap_bezier()

static void swap_bezier ( bezier b)
static

Definition at line 142 of file dotsplines.c.

References bezier::eflag, bezier::ep, bezier::list, bezier::sflag, bezier::size, bezier::sp, and SWAP.

Referenced by swap_spline().

Here is the caller graph for this function:

◆ swap_ends_p()

static bool swap_ends_p ( edge_t e)
static

Definition at line 111 of file dotsplines.c.

References aghead, agtail, ED_to_orig, ND_order, and ND_rank.

◆ swap_spline()

static void swap_spline ( splines s)
static

Definition at line 152 of file dotsplines.c.

References s::list, SWAP, and swap_bezier().

Referenced by edge_normalize().

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

◆ top_bound()

static edge_t * top_bound ( edge_t e,
int  side 
)
static

Definition at line 2125 of file dotsplines.c.

References aghead, agtail, ED_spl, ED_to_orig, ND_order, ND_out, and NULL.

Referenced by completeregularpath().

Here is the caller graph for this function:

◆ transformf()

static pointf transformf ( pointf  p,
pointf  del,
int  flip 
)
static

Definition at line 899 of file dotsplines.c.

References add_pointf(), del(), pointf_s::x, and pointf_s::y.

Referenced by make_flat_adj_edges().

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

Variable Documentation

◆ sinfo