]> granicus.if.org Git - graphviz/commitdiff
fix job control problem with -O and a single -T
authorellson <devnull@localhost>
Mon, 26 Jun 2006 20:25:22 +0000 (20:25 +0000)
committerellson <devnull@localhost>
Mon, 26 Jun 2006 20:25:22 +0000 (20:25 +0000)
lib/common/emit.c
lib/common/labels.c

index ad080da506255dfd570af8163bdd6da7c4a51f57..9142de56dd6e4b54c0722d7e88c3d14048772d63 100644 (file)
@@ -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 */
            
index 658ed2cf7b628716cb72fc2dd38ab9f8ebbb445b..b7e75a29da25f8f8a0be5a71f214b76a148d7ea5 100644 (file)
@@ -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 */