Graphviz 13.0.0~dev.20241220.2304
|
#include <common/render.h>
#include <label/xlabels.h>
#include <stdbool.h>
#include <stddef.h>
#include <util/agxbuf.h>
#include <util/alloc.h>
#include <util/prisize_t.h>
#include <util/unreachable.h>
Go to the source code of this file.
Data Structures | |
struct | cinfo_t |
Macros | |
#define | M1 "/pathbox {\n\ /Y exch %.5g sub def\n\ /X exch %.5g sub def\n\ /y exch %.5g sub def\n\ /x exch %.5g sub def\n\ newpath x y moveto\n\ X y lineto\n\ X Y lineto\n\ x Y lineto\n\ closepath stroke\n \} def\n\/dbgstart { gsave %.5g %.5g translate } def\n\/arrowlength 10 def\n\/arrowwidth arrowlength 2 div def\n\/arrowhead {\n\ gsave\n\ rotate\n\ currentpoint\n\ newpath\n\ moveto\n\ arrowlength arrowwidth 2 div rlineto\n\ 0 arrowwidth neg rlineto\n\ closepath fill\n\ grestore\n\} bind def\n\/makearrow {\n\ currentpoint exch pop sub exch currentpoint pop sub atan\n\ arrowhead\n\} bind def\n\/point {\ newpath\ 2 0 360 arc fill\} def\/makevec {\n\ /Y exch def\n\ /X exch def\n\ /y exch def\n\ /x exch def\n\ newpath x y moveto\n\ X Y lineto stroke\n\ X Y moveto\n\ x y makearrow\n\} def\n" |
#define | M2 "/pathbox {\n\ /X exch neg %.5g sub def\n\ /Y exch %.5g sub def\n\ /x exch neg %.5g sub def\n\ /y exch %.5g sub def\n\ newpath x y moveto\n\ X y lineto\n\ X Y lineto\n\ x Y lineto\n\ closepath stroke\n\} def\n" |
#define | HAVE_EDGE(ep) ((et != EDGETYPE_NONE) && (ED_spl(ep) != NULL)) |
Variables | |
static int | Rankdir |
static bool | Flip |
static pointf | Offset |
#define HAVE_EDGE | ( | ep | ) | ((et != EDGETYPE_NONE) && (ED_spl(ep) != NULL)) |
Definition at line 395 of file postproc.c.
#define M1 "/pathbox {\n\ /Y exch %.5g sub def\n\ /X exch %.5g sub def\n\ /y exch %.5g sub def\n\ /x exch %.5g sub def\n\ newpath x y moveto\n\ X y lineto\n\ X Y lineto\n\ x Y lineto\n\ closepath stroke\n \} def\n\/dbgstart { gsave %.5g %.5g translate } def\n\/arrowlength 10 def\n\/arrowwidth arrowlength 2 div def\n\/arrowhead {\n\ gsave\n\ rotate\n\ currentpoint\n\ newpath\n\ moveto\n\ arrowlength arrowwidth 2 div rlineto\n\ 0 arrowwidth neg rlineto\n\ closepath fill\n\ grestore\n\} bind def\n\/makearrow {\n\ currentpoint exch pop sub exch currentpoint pop sub atan\n\ arrowhead\n\} bind def\n\/point {\ newpath\ 2 0 360 arc fill\} def\/makevec {\n\ /Y exch def\n\ /X exch def\n\ /y exch def\n\ /x exch def\n\ newpath x y moveto\n\ X Y lineto stroke\n\ X Y moveto\n\ x y makearrow\n\} def\n" |
Definition at line 28 of file postproc.c.
#define M2 "/pathbox {\n\ /X exch neg %.5g sub def\n\ /Y exch %.5g sub def\n\ /x exch neg %.5g sub def\n\ /y exch %.5g sub def\n\ newpath x y moveto\n\ X y lineto\n\ X Y lineto\n\ x Y lineto\n\ closepath stroke\n\} def\n" |
Definition at line 73 of file postproc.c.
Definition at line 370 of file postproc.c.
References addClusterObj(), addLabelObj(), agroot(), info::bb, GD_clust, GD_label, and GD_n_cluster.
Referenced by addClusterObj(), and addXLabels().
|
static |
Definition at line 324 of file postproc.c.
References adjustBB(), textlabel_t::dimen, Flip, textlabel_t::pos, object_t::pos, object_t::sz, pointf_s::x, and pointf_s::y.
Referenced by addClusterObj(), and addXLabels().
Definition at line 347 of file postproc.c.
References adjustBB(), Flip, INCH2PS, ND_coord, ND_height, ND_width, object_t::pos, object_t::sz, pointf_s::x, and pointf_s::y.
Referenced by addXLabels().
|
static |
Definition at line 299 of file postproc.c.
References textlabel_t::dimen, Flip, xlabel_t::lbl, object_t::lbl, object_t::pos, xlabel_t::set, xlabel_t::sz, pointf_s::x, and pointf_s::y.
Referenced by addXLabels().
|
static |
position xlabels and any unpositioned edge labels using a map placement algorithm to avoid overlap
TODO: interaction with spline=ortho
Definition at line 401 of file postproc.c.
References addClusterObj(), addLabelObj(), addNodeObj(), addXLabel(), agfindgraphattr, agfstnode(), agfstout(), agnnodes(), agnxtnode(), agnxtout(), agwarningf(), label_params_t::bb, info::bb, centerPt(), cnt(), countClusterLabels(), ED_head_label, ED_label, ED_tail_label, ED_xlabel, EDGE_LABEL, EDGE_TYPE, EDGE_XLABEL, edgeHeadpoint(), EdgeLabelsDone, edgeMidpoint(), edgeTailpoint(), label_params_t::force, free(), GD_has_labels, GRAPH_LABEL, gv_calloc(), HAVE_EDGE, HEAD_LABEL, late_bool(), xlabel_t::lbl, boxf::LL, ND_xlabel, NODE_XLABEL, placeLabels(), textlabel_t::pos, printData(), PRISIZE_T, textlabel_t::set, xlabel_t::set, TAIL_LABEL, updateBB(), boxf::UR, and Verbose.
Referenced by gv_postprocess().
Definition at line 279 of file postproc.c.
References boxf::LL, MAX, MIN, object_t::pos, object_t::sz, boxf::UR, pointf_s::x, and pointf_s::y.
Referenced by addLabelObj(), and addNodeObj().
Definition at line 203 of file postproc.c.
References xlabel_t::pos, xlabel_t::sz, pointf_s::x, and pointf_s::y.
Referenced by addXLabels().
|
static |
Definition at line 385 of file postproc.c.
References agroot(), countClusterLabels(), GD_clust, GD_label, and GD_n_cluster.
Referenced by addXLabels(), and countClusterLabels().
void dotneato_postprocess | ( | Agraph_t * | g | ) |
Definition at line 689 of file postproc.c.
References gv_postprocess().
Referenced by circo_layout(), dot_layout(), main(), make_flat_adj_edges(), osage_layout(), pack_graph(), patchwork_layout(), sfdp_layout(), and twopi_layout().
Definition at line 258 of file postproc.c.
References bezier::eflag, bezier::ep, getsplinepoints(), bezier::list, splines::list, NULL, bezier::size, splines::size, pointf_s::x, and pointf_s::y.
Referenced by addXLabels().
Definition at line 239 of file postproc.c.
References getsplinepoints(), bezier::list, splines::list, NULL, bezier::sflag, bezier::sp, pointf_s::x, and pointf_s::y.
Referenced by addXLabels().
void gv_postprocess | ( | Agraph_t * | g, |
int | allowTranslation | ||
) |
Definition at line 597 of file postproc.c.
References addXLabels(), agxbdisown(), agxbprint(), Flip, GD_bb, GD_flip, GD_label, GD_label_pos, GD_rankdir, LABEL_AT_TOP, M1, M2, Offset, PAD, place_flip_graph_label(), place_graph_label(), place_root_label(), Rankdir, RANKDIR_BT, RANKDIR_LR, RANKDIR_RL, RANKDIR_TB, Show_boxes, translate_drawing(), UNREACHABLE, pointf_s::x, and pointf_s::y.
Referenced by dotneato_postprocess(), fdp_layout(), and neato_layout().
|
static |
Definition at line 94 of file postproc.c.
References agerrorf(), aghead, agnameof(), agtail, Concentrate, ED_edge_type, ED_head_label, ED_label, ED_spl, ED_tail_label, ED_xlabel, bezier::eflag, IGNORED, bezier::list, map_point(), NULL, bezier::sflag, and bezier::size.
Referenced by translate_drawing().
Definition at line 86 of file postproc.c.
References ccwrotatepf(), Offset, Rankdir, pointf_s::x, and pointf_s::y.
Referenced by map_edge(), translate_bb(), and translate_drawing().
|
static |
Definition at line 697 of file postproc.c.
References agroot(), GD_bb, GD_border, GD_clust, GD_label, GD_label_pos, GD_n_cluster, LABEL_AT_LEFT, LABEL_AT_RIGHT, LABEL_AT_TOP, LEFT_IX, place_flip_graph_label(), RIGHT_IX, pointf_s::x, and pointf_s::y.
Referenced by gv_postprocess(), and place_flip_graph_label().
void place_graph_label | ( | graph_t * | g | ) |
Definition at line 732 of file postproc.c.
References agroot(), BOTTOM_IX, GD_bb, GD_border, GD_clust, GD_label, GD_label_pos, GD_n_cluster, LABEL_AT_LEFT, LABEL_AT_RIGHT, LABEL_AT_TOP, place_graph_label(), TOP_IX, pointf_s::x, and pointf_s::y.
Referenced by gv_postprocess(), and place_graph_label().
Definition at line 176 of file postproc.c.
References GD_bb, GD_label, GD_label_pos, LABEL_AT_LEFT, LABEL_AT_RIGHT, LABEL_AT_TOP, pointf_s::x, and pointf_s::y.
Referenced by gv_postprocess().
|
static |
Definition at line 213 of file postproc.c.
References label_params_t::bb, label_params_t::force, xlabel_t::lbl, object_t::lbl, boxf::LL, xlabel_t::pos, object_t::pos, PRISIZE_T, xlabel_t::set, xlabel_t::sz, object_t::sz, boxf::UR, Verbose, pointf_s::x, and pointf_s::y.
Referenced by addXLabels().
void translate_bb | ( | graph_t * | g, |
int | rankdir | ||
) |
Definition at line 123 of file postproc.c.
References GD_bb, GD_clust, GD_label, GD_n_cluster, boxf::LL, map_point(), RANKDIR_BT, RANKDIR_LR, translate_bb(), boxf::UR, pointf_s::x, and pointf_s::y.
Referenced by translate_bb(), and translate_drawing().
|
static |
Definition at line 149 of file postproc.c.
References agfstnode(), agfstout(), agnxtnode(), agnxtout(), GD_rankdir, gv_nodesize(), GVSPLINES, map_edge(), map_point(), ND_coord, ND_xlabel, Offset, Rankdir, State, translate_bb(), pointf_s::x, and pointf_s::y.
Referenced by gv_postprocess().
|
static |
Definition at line 23 of file postproc.c.
Referenced by addLabelObj(), addNodeObj(), addXLabel(), and gv_postprocess().
|
static |
Definition at line 24 of file postproc.c.
Referenced by gv_postprocess(), map_point(), and translate_drawing().
|
static |
Definition at line 22 of file postproc.c.
Referenced by gv_postprocess(), map_point(), and translate_drawing().