46#define XDOTVERSION "1.7"
48#define NUMXBUFS (EMIT_HLABEL+1)
100 const unsigned char rgba[4]) {
101 if (rgba[3] == 0xFF) {
103 rgba[0], rgba[1], rgba[2]);
106 strlen(
"#FFFFFFFF"), rgba[0], rgba[1], rgba[2], rgba[3]);
116 const unsigned char rgba[4]) {
147 for (
size_t i = 0; i < n; i++)
169 agxbput (&xb,
"setlinewidth(");
184 if (
streq(p,
"filled") ||
streq(p,
"bold") ||
streq(p,
"setlinewidth"))
continue;
191 for (
const char *separator =
""; *p; separator =
",") {
223 for (; *value !=
'\0'; ++value) {
224 if (*value ==
'\\') {
294 unsigned short us = 0;
295 for (
size_t i = 0;
str[i] !=
'\0'; ++i) {
299 unsigned short digit = (
unsigned short)(
str[i] -
'0');
300 if (us > (USHRT_MAX - digit) / 10) {
304 us = (
unsigned short)(us * 10 + digit);
503 switch (span->
just) {
522 unsigned int bits =
flags & mask;
571 c1.
x =
G[0].x + (r2/4) * cos(angle);
572 c1.
y =
G[0].y + (r2/4) * sin(angle);
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 size_t agxblen(const agxbuf *xb)
return number of characters currently stored
static int agxbputc(agxbuf *xb, char c)
add character to buffer
Memory allocation wrappers that exit on failure.
static void * gv_alloc(size_t size)
void undoClusterEdges(graph_t *g)
attrsym_t * safe_dcl(graph_t *g, int obj_kind, char *name, char *defaultValue)
void get_gradient_points(pointf *A, pointf *G, size_t n, double angle, int flags)
require define api prefix
int agxset(void *obj, Agsym_t *sym, const char *value)
char * agget(void *obj, char *name)
int agsafeset(void *obj, char *name, const char *value, const char *def)
ensures the given attribute is declared before setting it locally on an object
void agwarningf(const char *fmt,...)
int agwrite(Agraph_t *g, void *chan)
Return 0 on success, EOF on failure.
void attach_attrs(graph_t *g)
replacements for ctype.h functions
static bool gv_isdigit(int c)
Graphviz context library.
#define GVRENDER_DOES_TOOLTIPS
#define OUTPUT_NOT_REQUIRED
#define LAYOUT_NOT_REQUIRED
#define GVRENDER_DOES_MAPS
#define GVRENDER_DOES_TARGETS
#define GVRENDER_DOES_TRANSFORM
int gvputs(GVJ_t *job, const char *s)
gvplugin_installed_t gvrender_dot_types[]
static void xdot_polygon(GVJ_t *job, pointf *A, size_t n, int filled)
int(* putstrfn)(void *chan, const char *str)
static void dot_end_graph(GVJ_t *job)
static void xdot_style(GVJ_t *job)
gvdevice_features_t device_features_canon
static void xdot_str_color(GVJ_t *job, const char *prefix, const unsigned char rgba[4])
static void xdot_end_cluster(GVJ_t *job)
static void xdot_fmt_num(agxbuf *buf, double v)
static void xdot_end_edge(GVJ_t *job)
void core_loadimage_xdot(GVJ_t *job, usershape_t *us, boxf b, bool filled)
static void xdot_str_color_xbuf(agxbuf *xb, const char *prefix, const unsigned char rgba[4])
static void xdot_pencolor(GVJ_t *job)
static void xdot_points(GVJ_t *job, char c, pointf *A, size_t n)
static void dot_begin_graph(GVJ_t *job)
static void xdot_fillcolor(GVJ_t *job)
gvrender_engine_t dot_engine
static void xdot_num(agxbuf *xb, double v)
gvrender_features_t render_features_dot
static void xdot_str_xbuf(agxbuf *xb, char *pfx, const char *s)
static unsigned int textflags[EMIT_ELABEL+1]
gvplugin_installed_t gvdevice_dot_types[]
static void xdot_begin_graph(graph_t *g, bool s_arrows, bool e_arrows, format_type id, double yOff)
static agxbuf xbuf[NUMXBUFS]
int(* flushfn)(void *chan)
static void xdot_textspan(GVJ_t *job, pointf p, textspan_t *span)
static unsigned short versionStr2Version(const char *str)
gvdevice_features_t device_features_dot
static void xdot_ellipse(GVJ_t *job, pointf *A, int filled)
static void xdot_end_node(GVJ_t *job)
static void xdot_str(GVJ_t *job, char *pfx, const char *s)
static const unsigned int flag_masks[]
static void xdot_end_graph(graph_t *g)
static void xdot_bezier(GVJ_t *job, pointf *A, size_t n, int filled)
gvrender_features_t render_features_xdot
gvrender_engine_t xdot_engine
static void put_escaping_backslashes(Agobj_t *n, Agsym_t *sym, const char *value)
static void xdot_gradient_fillcolor(GVJ_t *job, int filled, pointf *A, size_t n)
textitem scanner parser str
#define HAS_CLUST_EDGE(g)
double attach_attrs_and_arrows(graph_t *g, bool *sp, bool *ep)
double yDir(double y, double Y_off)
void write_plain(GVJ_t *job, graph_t *g, FILE *f, bool extend)
#define PRISIZE_T
PRIu64 alike for printing size_t
static bool streq(const char *a, const char *b)
are a and b equal?
int(* afread)(void *chan, char *buf, int bufsize)
int(* putstr)(void *chan, const char *str)
a generic header of Agraph_s, Agnode_s and Agedge_s
Agclos_t * clos
shared resources
gvplugin_active_render_t render
double yoffset_centerline