From 9716bd7772817b02f04d3a89e7573eef071749c4 Mon Sep 17 00:00:00 2001 From: ellson Date: Mon, 26 Jun 2006 20:25:22 +0000 Subject: [PATCH] fix job control problem with -O and a single -T --- lib/common/emit.c | 6 ++++-- lib/common/labels.c | 13 ++++++++----- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/lib/common/emit.c b/lib/common/emit.c index ad080da50..9142de56d 100644 --- a/lib/common/emit.c +++ b/lib/common/emit.c @@ -1852,9 +1852,11 @@ int gvRenderJobs (GVC_t * gvc, graph_t * g) 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 */ diff --git a/lib/common/labels.c b/lib/common/labels.c index 658ed2cf7..b7e75a29d 100644 --- a/lib/common/labels.c +++ b/lib/common/labels.c @@ -163,8 +163,8 @@ void 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; @@ -177,9 +177,6 @@ emit_textparas(GVJ_t* job, int nparas, textpara_t paras[], pointf p, 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); @@ -197,6 +194,12 @@ emit_textparas(GVJ_t* job, int nparas, textpara_t paras[], pointf p, 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 */ -- 2.40.0