From: erg Date: Thu, 28 Jul 2005 21:34:58 +0000 (+0000) Subject: Fix bug 754 - postscript output gave wrong bounding box and postscript X-Git-Tag: LAST_LIBGRAPH~32^2~7364 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ee82678a680ffb6c13372f049138e16f2cb04771;p=graphviz Fix bug 754 - postscript output gave wrong bounding box and postscript and pdf output had different bounding boxes --- diff --git a/lib/common/emit.c b/lib/common/emit.c index 3f7594945..9bfd29fff 100644 --- a/lib/common/emit.c +++ b/lib/common/emit.c @@ -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; diff --git a/lib/common/psgen.c b/lib/common/psgen.c index b1f97f827..583f69458 100644 --- a/lib/common/psgen.c +++ b/lib/common/psgen.c @@ -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);