|
Graphviz
2.31.20130525.0447
|
#include "render.h"#include "agxbuf.h"#include "htmltable.h"#include "entities.h"#include "logic.h"#include "gvc.h"#include <unistd.h>#include <ctype.h>#include <pwd.h>#include <string.h>
Go to the source code of this file.
Data Structures | |
| struct | fontinfo |
| struct | item |
| struct | clust_t |
Defines | |
| #define | W_DEGREE 5 |
| #define | PATHSEP ":" |
| #define | MAPC(n) (strncmp(agnameof(n),"cluster",7)?NULL:findCluster(cmap,agnameof(n))) |
| #define | MAXENTLEN 8 |
Functions | |
| nodequeue * | new_queue (int sz) |
| void | free_queue (nodequeue *q) |
| void | enqueue (nodequeue *q, node_t *n) |
| node_t * | dequeue (nodequeue *q) |
| int | late_int (void *obj, attrsym_t *attr, int def, int low) |
| double | late_double (void *obj, attrsym_t *attr, double def, double low) |
| char * | late_string (void *obj, attrsym_t *attr, char *def) |
| char * | late_nnstring (void *obj, attrsym_t *attr, char *def) |
| boolean | late_bool (void *obj, attrsym_t *attr, int def) |
| node_t * | UF_find (node_t *n) |
| node_t * | UF_union (node_t *u, node_t *v) |
| void | UF_remove (node_t *u, node_t *v) |
| void | UF_singleton (node_t *u) |
| void | UF_setname (node_t *u, node_t *v) |
| pointf | coord (node_t *n) |
| boolean | findStopColor (char *colorlist, char *clrs[2]) |
| pointf | Bezier (pointf *V, int degree, double t, pointf *Left, pointf *Right) |
| char * | Fgets (FILE *fp) |
| const char * | safefile (const char *filename) |
| int | maptoken (char *p, char **name, int *val) |
| boolean | mapBool (char *p, boolean dflt) |
| boolean | mapbool (char *p) |
| pointf | dotneato_closest (splines *spl, pointf pt) |
| pointf | spline_at_y (splines *spl, double y) |
| pointf | neato_closest (splines *spl, pointf p) |
| void | gvToggle (int s) |
| int | test_toggle () |
| void | common_init_node (node_t *n) |
| int | common_init_edge (edge_t *e) |
| void | updateBB (graph_t *g, textlabel_t *lp) |
| void | compute_bb (graph_t *g) |
| int | is_a_cluster (Agraph_t *g) |
| Agsym_t * | setAttr (graph_t *g, void *obj, char *name, char *value, Agsym_t *ap) |
| int | processClusterEdges (graph_t *g) |
| void | undoClusterEdges (graph_t *g) |
| attrsym_t * | safe_dcl (graph_t *g, int obj_kind, char *name, char *def) |
| char * | scanEntity (char *t, agxbuf *xb) |
| char * | htmlEntityUTF8 (char *s, graph_t *g) |
| char * | latin1ToUTF8 (char *s) |
| char * | utf8ToLatin1 (char *s) |
| boolean | overlap_node (node_t *n, boxf b) |
| boolean | overlap_label (textlabel_t *lp, boxf b) |
| boolean | overlap_edge (edge_t *e, boxf b) |
| int | edgeType (char *s, int dflt) |
| void | setEdgeType (graph_t *g, int dflt) |
| void | get_gradient_points (pointf *A, pointf *G, int n, float angle, boolean isRadial) |
| int | strcasecmp (const char *s1, const char *s2) |
| int | strncasecmp (const char *s1, const char *s2, unsigned int n) |
| void | gv_free_splines (edge_t *e) |
| void | gv_cleanup_edge (edge_t *e) |
| void | gv_cleanup_node (node_t *n) |
| void | gv_nodesize (node_t *n, boolean flip) |
| double | drand48 (void) |
| Dt_t * | mkClustMap (Agraph_t *g) |
| Agraph_t * | findCluster (Dt_t *map, char *name) |
| Agnodeinfo_t * | ninf (Agnode_t *n) |
| Agraphinfo_t * | ginf (Agraph_t *g) |
| Agedgeinfo_t * | einf (Agedge_t *e) |
| #define MAPC | ( | n | ) | (strncmp(agnameof(n),"cluster",7)?NULL:findCluster(cmap,agnameof(n))) |
| #define MAXENTLEN 8 |
Definition at line 1438 of file utils.c.
Referenced by scanEntity().
Definition at line 262 of file utils.c.
References W_DEGREE, pointf_s::x, pointf_s::y, and NULL.
Referenced by update_bb_bz(), bezier_clip(), place_portlabel(), dotneato_closest(), and spline_at_y().
| int common_init_edge | ( | edge_t * | e | ) |
Definition at line 773 of file utils.c.
References str, fontinfo::fontname, NULL, E_label, agxget(), ED_label, make_label(), aghtmlstr(), LT_HTML, fontinfo::fontsize, fontinfo::fontcolor, GD_has_labels, EDGE_LABEL, ED_label_ontop, mapbool(), late_string(), E_label_float, E_xlabel, ED_xlabel, EDGE_XLABEL, E_headlabel, ED_head_label, HEAD_LABEL, E_taillabel, ED_tail_label, TAIL_LABEL, agget(), TAIL_ID, ND_has_port, TRUE, ED_tail_port, ND_shape, E_tailclip, FALSE, HEAD_ID, ED_head_port, E_headclip, textlabel_t::pos, max, textlabel_t::dimen, pointf_s::x, pointf_s::y, boxf::LL, and boxf::UR.
| void common_init_node | ( | node_t * | n | ) |
Definition at line 672 of file utils.c.
References str, ND_width, late_double(), N_width, DEFAULT_NODEWIDTH, MIN_NODEWIDTH, ND_height, N_height, DEFAULT_NODEHEIGHT, MIN_NODEHEIGHT, ND_shape, bind_shape(), late_nnstring(), N_shape, DEFAULT_NODESHAPE, agxget(), N_label, fontinfo::fontsize, N_fontsize, DEFAULT_FONTSIZE, MIN_FONTSIZE, fontinfo::fontname, N_fontname, DEFAULT_FONTNAME, fontinfo::fontcolor, N_fontcolor, DEFAULT_COLOR, ND_label, make_label(), aghtmlstr(), LT_HTML, LT_NONE, shapeOf(), SH_RECORD, LT_RECD, N_xlabel, ND_xlabel, GD_has_labels, NODE_XLABEL, ND_showboxes, late_int(), N_showboxes, E_fontsize, E_fontname, E_fontcolor, E_labelfontsize, E_labelfontname, E_labelfontcolor, FALSE, mapbool(), NULL, and port::name.
Referenced by neato_init_node().
| void compute_bb | ( | graph_t * | g | ) |
Definition at line 909 of file utils.c.
References agnnodes(), GD_n_cluster, boxf::LL, boxf::UR, INT_MAX, agfstnode(), agnxtnode(), coord(), pointf_s::x, ND_xsize, pointf_s::y, ND_ysize, agfstout(), agnxtout(), ED_spl, ED_label, GD_flip, GD_bb, GD_clust, and GD_label.
Referenced by init_nop(), neato_layout(), spline_edges(), putGraphs(), and packSubgraphs().
Definition at line 199 of file utils.c.
References pointf_s::x, ND_pos, and pointf_s::y.
Referenced by compute_bb(), and right_of().
Definition at line 56 of file utils.c.
References nodequeue::head, nodequeue::tail, NULL, nodequeue::limit, and nodequeue::store.
Referenced by build_ranks().
Definition at line 520 of file utils.c.
References splines::size, splines::list, bezier::size, pointf_s::x, bezier::list, pointf_s::y, Bezier(), and NULL.
Referenced by edgeMidpoint(), and addEdgeLabels().
| double drand48 | ( | void | ) |
Definition at line 2093 of file utils.c.
Referenced by makeObstacle(), initLayout(), stress_majorization_kD_mkernel(), jitter_d(), randompos(), and move_node().
| int edgeType | ( | char * | s, |
| int | dflt | ||
| ) |
Definition at line 1811 of file utils.c.
References ET_NONE, ET_LINE, ET_SPLINE, strcasecmp(), ET_CURVED, ET_COMPOUND, ET_ORTHO, ET_PLINE, agerr(), and AGWARN.
Referenced by setEdgeType().
| Agedgeinfo_t* einf | ( | Agedge_t * | e | ) |
Definition at line 49 of file utils.c.
References nodequeue::tail, nodequeue::limit, and nodequeue::store.
Referenced by build_ranks(), and enqueue_neighbors().
| char* Fgets | ( | FILE * | fp | ) |
Definition at line 2163 of file utils.c.
References dtmatch, clust_t::clp, and NULL.
| boolean findStopColor | ( | char * | colorlist, |
| char * | clrs[2] | ||
| ) |
| void free_queue | ( | nodequeue * | q | ) |
Definition at line 43 of file utils.c.
References free(), and nodequeue::store.
Referenced by build_ranks().
Definition at line 1924 of file utils.c.
References max, pointf_s::x, pointf_s::y, MIN, and MAX.
| Agraphinfo_t* ginf | ( | Agraph_t * | g | ) |
| void gv_cleanup_edge | ( | edge_t * | e | ) |
Definition at line 2027 of file utils.c.
References free(), ED_path, gv_free_splines(), free_label(), ED_label, ED_xlabel, ED_head_label, and ED_tail_label.
| void gv_cleanup_node | ( | node_t * | n | ) |
| void gv_free_splines | ( | edge_t * | e | ) |
| void gvToggle | ( | int | s | ) |
Definition at line 653 of file utils.c.
References gvToggle().
Referenced by main(), and gvToggle().
| char* htmlEntityUTF8 | ( | char * | s, |
| graph_t * | g | ||
| ) |
Definition at line 1566 of file utils.c.
References agxbinit(), agxbputc, agerr(), AGWARN, agxbuse, and agxbfree().
Referenced by make_html_label(), and make_label().
| int is_a_cluster | ( | Agraph_t * | g | ) |
Definition at line 964 of file utils.c.
References Agraph_t::root, and strncasecmp().
| double late_double | ( | void * | obj, |
| attrsym_t * | attr, | ||
| double | def, | ||
| double | low | ||
| ) |
Definition at line 85 of file utils.c.
References ag_xget.
Referenced by arrow_length(), emit_clusters(), graph_init(), do_graph_label(), place_portlabel(), common_init_node(), and fdp_initParams().
| int late_int | ( | void * | obj, |
| attrsym_t * | attr, | ||
| int | def, | ||
| int | low | ||
| ) |
Definition at line 69 of file utils.c.
Referenced by emit_clusters(), graph_init(), common_init_node(), dot_layout(), fdp_init_graph(), and fdp_initParams().
| char* late_nnstring | ( | void * | obj, |
| attrsym_t * | attr, | ||
| char * | def | ||
| ) |
Definition at line 113 of file utils.c.
References late_string().
Referenced by emit_clusters(), do_graph_label(), write_plain(), findAttrColor(), and common_init_node().
| char* late_string | ( | void * | obj, |
| attrsym_t * | attr, | ||
| char * | def | ||
| ) |
Definition at line 102 of file utils.c.
References agxget().
Referenced by emit_graph(), graph_init(), late_nnstring(), and common_init_edge().
| char* latin1ToUTF8 | ( | char * | s | ) |
Definition at line 1658 of file utils.c.
References agxbinit(), agxbputc, agxbuse, and agxbfree().
Referenced by make_html_label(), and make_label().
| boolean mapbool | ( | char * | p | ) |
Definition at line 515 of file utils.c.
References mapBool(), and FALSE.
Referenced by circularLayout(), graph_init(), late_bool(), common_init_node(), common_init_edge(), nonconstraint_edge(), dot_layout(), dot_mincross(), and user_pos().
| int maptoken | ( | char * | p, |
| char ** | name, | ||
| int * | val | ||
| ) |
Definition at line 2153 of file utils.c.
References dtopen(), and Dtoset.
Referenced by processClusterEdges(), and dot_compoundEdges().
Definition at line 645 of file utils.c.
References spline_at_y(), and pointf_s::y.
| nodequeue* new_queue | ( | int | sz | ) |
Definition at line 32 of file utils.c.
References NEW, nodequeue::head, nodequeue::tail, nodequeue::store, N_NEW, and nodequeue::limit.
Referenced by build_ranks().
| Agnodeinfo_t* ninf | ( | Agnode_t * | n | ) |
Definition at line 1789 of file utils.c.
References ED_spl, splines::bb, splines::size, splines::list, TRUE, ED_label, overlap_label(), and FALSE.
| boolean overlap_label | ( | textlabel_t * | lp, |
| boxf | b | ||
| ) |
Definition at line 1742 of file utils.c.
References pointf_s::x, textlabel_t::dimen, pointf_s::y, boxf::LL, textlabel_t::pos, and boxf::UR.
Referenced by overlap_edge().
Definition at line 1725 of file utils.c.
References ND_bb, FALSE, ND_coord, boxf::UR, boxf::LL, inside_t::s, inside_t::n, inside_t::bp, NULL, and ND_shape.
| int processClusterEdges | ( | graph_t * | g | ) |
Definition at line 1261 of file utils.c.
References mkClustMap(), SMALLBUF, dtopen(), Dtoset, agsubg(), TRUE, agxbinit(), agfstnode(), agnxtnode(), IS_CLUST_NODE, agfstout(), agnxtout(), agxbfree(), dtclose(), agnnodes(), agdelete(), agclose(), and SET_CLUST_EDGE.
Referenced by fdp_init_node_edge().
Definition at line 1425 of file utils.c.
References agattr(), and NULL.
Referenced by attach_attrs_and_arrows().
| const char* safefile | ( | const char * | filename | ) |
Definition at line 419 of file utils.c.
References TRUE, NULL, str, HTTPServerEnVar, Gvfilepath, agerr(), AGWARN, FALSE, Gvimagepath, free(), and DIRSEP.
Referenced by epsf_init(), cat_libfile(), bind_shape(), and gvusershape_file_access().
| char* scanEntity | ( | char * | t, |
| agxbuf * | xb | ||
| ) |
Definition at line 1445 of file utils.c.
References MAXENTLEN, agxbputc, entities_s::name, NR_OF_ENTITIES, entities_s::value, and agxbput().
Definition at line 973 of file utils.c.
References NULL, agobjkind, AGGRAPH, agraphattr, AGRAPH, agattr(), AGNODE, agnodeattr, AGEDGE, agedgeattr, agxset(), and Agsym_t::index.
| void setEdgeType | ( | graph_t * | g, |
| int | dflt | ||
| ) |
Definition at line 1901 of file utils.c.
References agget(), ET_NONE, edgeType(), and GD_flags.
Referenced by circo_init_graph(), dot_layout(), fdp_init_graph(), neato_layout(), and twopi_init_graph().
Definition at line 580 of file utils.c.
References NULL, splines::size, splines::list, BETWEEN, bezier::list, bezier::size, pointf_s::y, assert, pointf_s::x, Bezier(), and ABS.
Referenced by neato_closest().
| int strncasecmp | ( | const char * | s1, |
| const char * | s2, | ||
| unsigned int | n | ||
| ) |
| int test_toggle | ( | void | ) |
Definition at line 661 of file utils.c.
Referenced by move_node().
Definition at line 134 of file utils.c.
References ND_UF_parent.
Referenced by UF_union(), UF_setname(), nonconstraint_edge(), class1(), class2(), and decompose().
Definition at line 178 of file utils.c.
References assert, ND_UF_size, and ND_UF_parent.
Definition at line 192 of file utils.c.
References assert, UF_find(), ND_UF_parent, and ND_UF_size.
Referenced by mark_clusters().
| void UF_singleton | ( | node_t * | u | ) |
Definition at line 185 of file utils.c.
References ND_UF_size, ND_UF_parent, NULL, ND_ranktype, and NORMAL.
Referenced by mark_clusters().
Definition at line 149 of file utils.c.
References ND_UF_parent, NULL, ND_UF_size, UF_find(), and ND_id.
| void undoClusterEdges | ( | graph_t * | g | ) |
Definition at line 1385 of file utils.c.
References agsubg(), TRUE, agfstnode(), agnxtnode(), agfstout(), agnxtout(), agdelete(), and agclose().
Referenced by attach_attrs_and_arrows().
| void updateBB | ( | graph_t * | g, |
| textlabel_t * | lp | ||
| ) |
Definition at line 899 of file utils.c.
References GD_bb, and GD_flip.
Referenced by makePortLabels(), addEdgeLabels(), and makeSelfArcs().
| char* utf8ToLatin1 | ( | char * | s | ) |
Definition at line 1699 of file utils.c.
References agxbinit(), agxbputc, agxbuse, and agxbfree().
Referenced by ps_string().
1.7.5