22#define YDIR(y) (Y_invert ? (Y_off - (y)) : (y))
23#define YFDIR(y) (Y_invert ? (YF_off - (y)) : (y))
33static void agputs(
int (*putstr)(
void *chan,
const char *
str),
const char*
s,
38static void agputc(
int (*putstr)(
void *chan,
const char *
str),
char c,
40 static char buf[2] = {
'\0',
'\0'};
51static void printint(
int (*putstr)(
void *chan,
const char *
str), FILE *f,
71static void printpoint(
int (*putstr)(
void *chan,
const char *
str), FILE *f,
110 if (portname && *portname)
146 if (fillcolor[0] ==
'\0')
155 if (!(tport =
agget(e,
"tailport")))
157 if (!(hport =
agget(e,
"headport")))
163 size_t splinePoints = 0;
164 for (
size_t i = 0; i <
ED_spl(e)->size; i++) {
166 splinePoints += bz.
size;
171 printint(putstr, f,
" ", splinePoints);
172 for (
size_t i = 0; i <
ED_spl(e)->size; i++) {
174 for (
size_t j = 0; j < bz.
size; j++)
187 agputs(putstr,
"stop\n", f);
201 for (i = 0; i < f->
n_flds; i++)
240 bool e_arrows =
false;
241 bool s_arrows =
false;
270 for (k = 3; k <
GD_odim(g); k++) {
287 if (strcmp(
ND_shape(n)->name,
"record") == 0) {
295 size_t sides =
poly->sides;
297 char *p =
agget(n,
"samplepoints");
299 sides = strtoul(p,
NULL, 0);
305 for (
size_t i = 0; i < sides; i++) {
308 if (
poly->sides >= 3)
314 ND_width(n) / 2.0 * cos((
double)i / (
double)sides *
M_PI * 2.0),
326 for (
size_t i = 0; i <
ED_spl(e)->size; i++) {
329 if (
ED_spl(e)->list[i].sflag) {
335 if (
ED_spl(e)->list[i].eflag) {
341 for (
size_t j = 0; j <
ED_spl(e)->list[i].size; j++) {
344 ptf =
ED_spl(e)->list[i].list[j];
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 int agxbputc(agxbuf *xb, char c)
add character to buffer
static char * agxbuse(agxbuf *xb)
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.
int agstrfree(Agraph_t *, const char *)
char * agstrdup(Agraph_t *, const char *)
returns a pointer to a reference-counted copy of the argument string, creating one if necessary
char * agcanonStr(char *str)
void attach_attrs(graph_t *g)
Graphviz context library.
#define HAS_CLUST_EDGE(g)
static void setYInvert(graph_t *g)
static void agputc(int(*putstr)(void *chan, const char *str), char c, FILE *fp)
static void set_record_rects(node_t *n, field_t *f, agxbuf *xb)
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)
static void printstring(int(*putstr)(void *chan, const char *str), FILE *f, char *prefix, char *s)
void attach_attrs_and_arrows(graph_t *g, bool *sp, bool *ep)
static void printint(int(*putstr)(void *chan, const char *str), FILE *f, char *prefix, size_t i)
static char * canon(graph_t *g, char *s)
static void printpoint(int(*putstr)(void *chan, const char *str), FILE *f, pointf p)
void write_plain(GVJ_t *job, graph_t *g, FILE *f, bool extend)
static void printdouble(int(*putstr)(void *chan, const char *str), FILE *f, char *prefix, double v)
static void agputs(int(*putstr)(void *chan, const char *str), const char *s, FILE *fp)
#define PRISIZE_T
PRIu64 alike for printing size_t
int(* putstr)(void *chan, const char *str)
Agclos_t * clos
shared resources