return -1;
}
- /* if we already have an active job list to a different output device */
+ /* if we already have an active job list and the device doesn't support mutiple output files, or we are about to write to a different output device */
if ((active_job = gvc->active_jobs)
- && strcmp(job->output_langname,gvc->active_jobs->output_langname) != 0) {
+ && (!(active_job->flags & GVRENDER_DOES_MULTIGRAPH_OUTPUT_FILES)
+ || (strcmp(job->output_langname,active_job->output_langname)))) {
+
gvrender_end_job(active_job);
gvdevice_finalize(gvc); /* finalize previous jobs */
emit_textparas(GVJ_t* job, int nparas, textpara_t paras[], pointf p,
double halfwidth_x, char* fname, double fsize, char* fcolor)
{
- int i, paraspacing;
- double tmp, center_x, left_x, right_x;
+ int i, paraspacing, tmp;
+ double center_x, left_x, right_x;
center_x = p.x;
left_x = center_x - halfwidth_x;
p.y += paraspacing * (nparas - 1) / 2 /* cl of toppara */
- fsize * 0.30; /* Empirically determined fudge factor */
- tmp = ROUND(p.y); /* align with integer points */
- p.y = (double)tmp;
-
gvrender_begin_context(job);
gvrender_set_pencolor(job, fcolor);
gvrender_set_font(job, fname, fsize);
p.x = center_x;
break;
}
+
+ tmp = ROUND(p.x); /* align with integer points */
+ p.x = (double)tmp;
+ tmp = ROUND(p.y); /* align with integer points */
+ p.y = (double)tmp;
+
gvrender_textpara(job, p, &(paras[i]));
/* position for next para */