Graphviz 13.0.0~dev.20241220.2304
|
#include "config.h"
#include <cgraph/list.h>
#include <common/geom.h>
#include <math.h>
#include <neatogen/neato.h>
#include <neatogen/adjust.h>
#include <stddef.h>
#include <stdbool.h>
#include <util/alloc.h>
Go to the source code of this file.
Data Structures | |
struct | nitem |
struct | info |
Macros | |
#define | SCALE 10 |
#define | SCALE2 (SCALE/2) |
Typedefs | |
typedef struct nitem | nitem |
typedef int(* | distfn) (box *, box *) |
typedef int(* | intersectfn) (nitem *, nitem *) |
Functions | |
static int | cmpitem (void *item1, void *item2) |
static int | distY (box *b1, box *b2) |
static int | distX (box *b1, box *b2) |
static int | intersectX0 (nitem *p, nitem *q) |
static int | intersectY0 (nitem *p, nitem *q) |
static int | intersectY (nitem *p, nitem *q) |
static int | intersectX (nitem *p, nitem *q) |
static void | mapGraphs (graph_t *g, graph_t *cg, distfn dist) |
static graph_t * | mkNConstraintG (graph_t *g, Dt_t *list, intersectfn intersect, distfn dist) |
static graph_t * | mkConstraintG (Dt_t *list, intersectfn intersect, distfn dist) |
static void | closeGraph (graph_t *cg) |
static void | constrainX (graph_t *g, nitem *nlist, int nnodes, intersectfn ifn, int ortho) |
static void | constrainY (graph_t *g, nitem *nlist, int nnodes, intersectfn ifn, int ortho) |
static int | overlaps (nitem *p, int cnt) |
static void | initItem (node_t *n, nitem *p, expand_t margin) |
int | cAdjust (graph_t *g, int mode) |
static int | sortf (const void *x, const void *y) |
static double | compress (info *nl, int nn) |
static pointf * | mkOverlapSet (info *nl, size_t nn, size_t *cntp) |
static pointf | computeScaleXY (pointf *aarr, size_t m) |
static double | computeScale (pointf *aarr, size_t m) |
int | scAdjust (graph_t *g, int equal) |
Variables | |
static Dtdisc_t | constr |
#define SCALE 10 |
Definition at line 23 of file constraint.c.
#define SCALE2 (SCALE/2) |
Definition at line 24 of file constraint.c.
Definition at line 36 of file constraint.c.
Definition at line 37 of file constraint.c.
int cAdjust | ( | graph_t * | g, |
int | mode | ||
) |
Definition at line 555 of file constraint.c.
References agfstnode(), agnnodes(), agnxtnode(), AM_ORTHO, AM_ORTHO_YX, AM_ORTHOXY, AM_ORTHOYX, AM_PORTHO, AM_PORTHO_YX, AM_PORTHOXY, AM_PORTHOYX, constrainX(), constrainY(), free(), gv_calloc(), initItem(), intersectX(), intersectX0(), intersectY(), intersectY0(), ND_pos, nitem::np, overlaps(), nitem::pos, PS2INCH, SCALE, sepFactor(), point::x, and point::y.
Referenced by removeOverlapWith().
|
static |
Definition at line 372 of file constraint.c.
References agclose(), agfstnode(), agnxtnode(), cg(), free_list, ND_in, and ND_out.
Referenced by constrainX(), and constrainY().
|
static |
Definition at line 39 of file constraint.c.
|
static |
Definition at line 646 of file constraint.c.
References info::bb, info::ht2, OVERLAP, info::pos, info::wd2, pointf_s::x, and pointf_s::y.
Referenced by scAdjust().
|
static |
Definition at line 762 of file constraint.c.
References pointf_s::x, and pointf_s::y.
Referenced by scAdjust().
Definition at line 722 of file constraint.c.
References free(), gv_calloc(), scale(), sortf(), pointf_s::x, and pointf_s::y.
Referenced by scAdjust().
|
static |
Definition at line 387 of file constraint.c.
References nitem::bb, cg(), closeGraph(), nitem::cnode, constr, delta, distX(), dtclose(), dtinsert, Dtobag, dtopen(), box::LL, mkConstraintG(), mkNConstraintG(), ND_rank, newpos(), nitem::pos, rank(), box::UR, nitem::val, and point::x.
Referenced by cAdjust().
|
static |
Definition at line 425 of file constraint.c.
References agattr(), AGEDGE, agfstedge(), agfstnode(), AGNODE, agnxtedge(), agnxtnode(), agxset(), nitem::bb, cg(), closeGraph(), nitem::cnode, constr, delta, distY(), dtclose(), dtinsert, Dtobag, dtopen(), ED_minlen, box::LL, mkConstraintG(), mkNConstraintG(), ND_rank, newpos(), nitem::pos, rank(), box::UR, nitem::val, and point::y.
Referenced by cAdjust().
Definition at line 65 of file constraint.c.
References box::LL, box::UR, and point::x.
Referenced by constrainX(), intersectX0(), and intersectY0().
Definition at line 60 of file constraint.c.
References box::LL, box::UR, and point::y.
Referenced by constrainY(), intersectX0(), and intersectY0().
Definition at line 499 of file constraint.c.
References nitem::bb, expand_t::doAdd, box::LL, ND_height, ND_pos, ND_width, nitem::np, POINTS, nitem::pos, SCALE, SCALE2, box::UR, point::x, expand_t::x, point::y, and expand_t::y.
Referenced by cAdjust().
Definition at line 126 of file constraint.c.
References agbindrec(), agedge(), agfstnode(), agfstout(), aghead, agnxtnode(), agnxtout(), nitem::bb, cg(), nitem::cnode, delta, dist(), ED_minlen, ED_weight, elist_append, ND_alg, ND_in, ND_out, and NULL.
Referenced by mkConstraintG().
|
static |
Definition at line 271 of file constraint.c.
References agbindrec(), agclose(), agedge(), agnameof(), agnode(), agopen(), Agstrictdirected, alloc_elist, cg(), nitem::cnode, cnt(), dist(), dtflatten(), dtlink, ED_minlen, ED_weight, elist_append, GD_nlist, intersect(), mapGraphs(), ND_alg, ND_in, ND_next, ND_out, nitem::np, NULL, prev, SCALE, nitem::val, and nitem::vnode.
Referenced by constrainX(), and constrainY().
|
static |
Definition at line 212 of file constraint.c.
References agbindrec(), agedge(), agfindedge, agfstout(), aghead, agnameof(), agnode(), agnxtout(), agopen(), Agstrictdirected, alloc_elist, nitem::bb, cg(), nitem::cnode, delta, dist(), dtflatten(), dtlink, ED_minlen, ED_weight, elist_append, GD_nlist, intersect(), ND_alg, ND_in, ND_next, ND_out, nitem::np, and NULL.
Referenced by constrainX(), and constrainY().
Definition at line 684 of file constraint.c.
References info::bb, info::ht2, OVERLAP, info::pos, S, info::wd2, pointf_s::x, and pointf_s::y.
Referenced by scAdjust().
|
static |
Definition at line 479 of file constraint.c.
References nitem::bb, cnt(), and OVERLAP.
Referenced by adjust(), cAdjust(), and countOverlap().
int scAdjust | ( | graph_t * | g, |
int | equal | ||
) |
Definition at line 787 of file constraint.c.
References agfstnode(), agnnodes(), agnxtnode(), info::bb, compress(), computeScale(), computeScaleXY(), expand_t::doAdd, free(), gv_calloc(), info::ht2, boxf::LL, mkOverlapSet(), ND_height, ND_pos, ND_width, info::np, info::pos, PS2INCH, sepFactor(), boxf::UR, Verbose, info::wd2, pointf_s::x, expand_t::x, pointf_s::y, and expand_t::y.
Referenced by removeOverlapWith().
|
static |
Definition at line 631 of file constraint.c.
References pointf_s::x, and pointf_s::y.
Referenced by computeScaleXY().
|
static |
Definition at line 51 of file constraint.c.
Referenced by constrainX(), constrainY(), is_nonconstraint(), and nonconstraint_edge().