33double yDir(
double y,
double Y_off) {
37static void agputs(
int (*putstr)(
void *chan,
const char *
str),
const char*
s,
42static void agputc(
int (*putstr)(
void *chan,
const char *
str),
char c,
44 char buf[] = {c,
'\0'};
54static void printint(
int (*putstr)(
void *chan,
const char *
str),
void *f,
74static void printpoint(
int (*putstr)(
void *chan,
const char *
str),
void *f,
120 if (portname && *portname) {
166 if (fillcolor[0] ==
'\0')
175 if (!(tport =
agget(e,
"tailport")))
177 if (!(hport =
agget(e,
"headport")))
183 size_t splinePoints = 0;
184 for (
size_t i = 0; i <
ED_spl(e)->size; i++) {
186 splinePoints += bz.
size;
191 printint(putstr, f,
" ", splinePoints);
192 for (
size_t i = 0; i <
ED_spl(e)->size; i++) {
194 for (
size_t j = 0; j < bz.
size; j++)
210 agputs(putstr,
"stop\n", f);
223 for (i = 0; i < f->
n_flds; i++)
263 bool e_arrows =
false;
264 bool s_arrows =
false;
295 for (k = 3; k <
GD_odim(g); k++) {
312 if (strcmp(
ND_shape(n)->name,
"record") == 0) {
320 size_t sides =
poly->sides;
322 char *p =
agget(n,
"samplepoints");
324 sides = strtoul(p,
NULL, 0);
330 for (
size_t i = 0; i < sides; i++) {
333 if (
poly->sides >= 3)
339 ND_width(n) / 2.0 * cos((
double)i / (
double)sides *
M_PI * 2.0),
341 ND_height(n) / 2.0 * sin((
double)i / (
double)sides *
M_PI * 2.0)));
352 for (
size_t i = 0; i <
ED_spl(e)->size; i++) {
355 if (
ED_spl(e)->list[i].sflag) {
361 if (
ED_spl(e)->list[i].eflag) {
367 for (
size_t j = 0; j <
ED_spl(e)->list[i].size; j++) {
370 ptf =
ED_spl(e)->list[i].list[j];
Helpers for dealing with agstrcanon
static char * agstrcanon_buffer(const char *str)
get a buffer suitable for passing into agstrcanon
static int agxbpop(agxbuf *xb)
removes last character added, if any
static void agxbfree(agxbuf *xb)
free any malloced resources
static int agxbprint(agxbuf *xb, const char *fmt,...)
Printf-style output to an agxbuf.
static WUR char * agxbuse(agxbuf *xb)
static int agxbputc(agxbuf *xb, char c)
add character to buffer
void undoClusterEdges(graph_t *g)
char * late_nnstring(void *obj, attrsym_t *attr, char *defaultValue)
attrsym_t * safe_dcl(graph_t *g, int obj_kind, char *name, char *defaultValue)
void gv_fixLocale(int set)
#define PS2INCH(a_points)
bool Y_invert
invert y in dot & plain output
require define api prefix
int agset(void *obj, char *name, const char *value)
int agxset(void *obj, Agsym_t *sym, const char *value)
char * agget(void *obj, char *name)
char * agxget(void *obj, Agsym_t *sym)
Agedge_t * agfstout(Agraph_t *g, Agnode_t *n)
Agedge_t * agnxtout(Agraph_t *g, Agedge_t *e)
Agnode_t * agnxtnode(Agraph_t *g, Agnode_t *n)
Agnode_t * agfstnode(Agraph_t *g)
Agraph_t * agraphof(void *obj)
char * agnameof(void *)
returns a string descriptor for the object.
char * agstrcanon(char *, char *)
int agstrfree(Agraph_t *, const char *, bool is_html)
char * agstrdup(Agraph_t *, const char *)
returns a pointer to a reference-counted copy of the argument string, creating one if necessary
void attach_attrs(graph_t *g)
Graphviz context library.
textitem scanner parser str
#define HAS_CLUST_EDGE(g)
static void agputs(int(*putstr)(void *chan, const char *str), const char *s, void *fp)
static void printpoint(int(*putstr)(void *chan, const char *str), void *f, pointf p, double yOff)
static void printdouble(int(*putstr)(void *chan, const char *str), void *f, char *prefix, double v)
static void writenodeandport(int(*putstr)(void *chan, const char *str), FILE *f, node_t *node, char *portname)
static void rec_attach_bb(graph_t *g, Agsym_t *bbsym, Agsym_t *lpsym, Agsym_t *lwsym, Agsym_t *lhsym, double yOff)
void write_plain(GVJ_t *job, graph_t *g, void *f, bool extend)
static double YFDIR(offsets_t offsets, double y)
double attach_attrs_and_arrows(graph_t *g, bool *sp, bool *ep)
double yDir(double y, double Y_off)
static void agputc(int(*putstr)(void *chan, const char *str), char c, void *fp)
static char * canon(graph_t *g, char *s, char *buffer)
static void printint(int(*putstr)(void *chan, const char *str), void *f, char *prefix, size_t i)
static void printstring(int(*putstr)(void *chan, const char *str), void *f, char *prefix, char *s)
static void set_record_rects(node_t *n, field_t *f, agxbuf *xb, double yOff)
static offsets_t setYInvert(graph_t *g)
int(* putstr)(void *chan, const char *str)
Agclos_t * clos
shared resources
state for offset calculations