Fix bug 754 - postscript output gave wrong bounding box and postscript
authorerg <devnull@localhost>
Thu, 28 Jul 2005 21:34:58 +0000 (21:34 +0000)
committererg <devnull@localhost>
Thu, 28 Jul 2005 21:34:58 +0000 (21:34 +0000)
and pdf output had different bounding boxes

lib/common/emit.c
lib/common/psgen.c

index 3f759494543313572d2f7eb36685c7407087073a..9bfd29fff218dfde3f5de907c6df4671f7ce22f0 100644 (file)
@@ -1062,6 +1062,7 @@ static void init_job_dpi(GVJ_t *job, graph_t *g)
             job->dpi = job->render.features->default_dpi;
             break;
         case POSTSCRIPT:
+        case PDF:
         case SVG:
            job->dpi = POINTS_PER_INCH;
             break;
index b1f97f8270964aa3774b6f8b3822e5385279e2c3..583f69458c596e04e227d0757a7bd7a5f66cfc33 100644 (file)
@@ -104,14 +104,12 @@ static void ps_comment(char *str)
 static void ps_begin_graph(GVC_t * gvc, graph_t * g, box bb, point pb)
 {
     char *s;
-    point sz;
 
     PB = bb;
-    sz = add_points(PB.LL, PB.UR);
     if (onetime) {
        if (Show_boxes == NULL)
            fprintf(Output_file, "%%%%BoundingBox: %d %d %d %d\n",
-               0, 0, sz.x, sz.y);
+               PB.LL.x, PB.LL.y, PB.UR.x, PB.UR.y);
        fprintf(Output_file, "%%%%EndComments\nsave\n");
        cat_libfile(Output_file, U_lib, ps_txt);
        epsf_define(Output_file);