#endif
if (! (job->flags & GVRENDER_X11_EVENTS)) {
+ /* Show_boxes is not defined, if at all,
+ * until splines are generated in dot
+ */
+#ifdef DEBUG
+ job->common->show_boxes = Show_boxes;
+#endif
emit_graph(job, g); /* FIXME? - this should be a special case of finalize() */
/* Flush is necessary because we may be writing to a pipe. */
Show_cnt = newcnt;
Show_boxes[Show_cnt+1] = NULL;
}
+
static void psprintline(Ppolyline_t pl)
{
char buf[BUFSIZ];
Show_cnt = newcnt;
Show_boxes[Show_cnt+1] = NULL;
}
+
static void psprintpoly(Ppoly_t p)
{
char buf[BUFSIZ];
Show_cnt = newcnt;
Show_boxes[Show_cnt+1] = NULL;
}
+
static void psprintboxes(int boxn, box* boxes)
{
char buf[BUFSIZ];
Show_cnt = newcnt;
Show_boxes[Show_cnt+1] = NULL;
}
+
static void psprintinit (int begin)
{
int newcnt = Show_cnt + 1;
ND_showboxes(realedge->head) == i ||
ND_showboxes(realedge->tail) == i);
}
-#endif
+#endif /* DEBUG */
#ifdef OBSOLETE
static point mkpt(int x, int y)
abort();
}
maxpn = PINC;
+#ifdef DEBUG
if (Show_boxes) {
int i;
for (i = 0; Show_boxes[i]; i++)
Show_boxes = NULL;
Show_cnt = 0;
}
+#endif
nedges = 0;
nboxes = 0;
if (Verbose)
#include "render.h"
+#ifdef DEBUG
static int debugleveln(edge_t* e, int i)
{
return (GD_showboxes(e->head->graph) == i ||
Show_cnt = newcnt;
Show_boxes[Show_cnt+1] = NULL;
}
+#endif
/* arrow_clip:
* Clip arrow to node boundary.
dx += width - stepx;
}
clip_and_install(e, e, points, pointn, sinfo);
+#ifdef DEBUG
if (debugleveln(e,1))
showPoints (points, pointn);
+#endif
}
}
dx += width - stepx;
}
clip_and_install(e, e, points, pointn, sinfo);
+#ifdef DEBUG
if (debugleveln(e,1))
showPoints (points, pointn);
+#endif
}
}
dy += height - stepy;
}
clip_and_install(e, e, points, pointn, sinfo);
+#ifdef DEBUG
if (debugleveln(e,1))
showPoints (points, pointn);
+#endif
}
return;
}
dy += height - stepy;
}
clip_and_install(e, e, points, pointn, sinfo);
+#ifdef DEBUG
if (debugleveln(e,1))
showPoints (points, pointn);
+#endif
}
}
#include "gvcint.h"
#include "gvcproc.h"
-/* for Show_boxes */
-#include "globals.h"
-
/* from common/utils.c */
extern void *zmalloc(size_t);
gvc->common.info = info;
gvc->common.user = user;
gvc->common.errorfn = agerrorf;
- gvc->common.show_boxes = Show_boxes;
}
return gvc;
}
cat_preamble(job, job->common->lib);
/* include epsf */
epsf_define(job->output_file);
+ if (job->common->show_boxes) {
+ char* args[2];
+ args[0] = job->common->show_boxes[0];
+ args[1] = NULL;
+ cat_libfile(job->output_file, NULL, args);
+ }
}
isLatin1 = (GD_charset(obj->u.g) == CHAR_LATIN1);
/* We always setup Latin1. The charset info is always output,
static void psgen_end_page(GVJ_t * job)
{
-// if (job->common->show_boxes)
-// cat_libfile(job->output_file, NULL, job->common->show_boxes + 1);
+ if (job->common->show_boxes) {
+ core_fputs(job, "0 0 0 edgecolor\n");
+ cat_libfile(job->output_file, NULL, job->common->show_boxes + 1);
+ }
/* the showpage is really a no-op, but at least one PS processor
* out there needs to see this literal token. endpage does the real work.
*/