--- gdevps.c.orig Tue Aug 25 00:08:38 1998 +++ gdevps.c Thu Oct 8 02:22:43 1998 @@ -37,6 +37,12 @@ #include "strimpl.h" #include "sa85x.h" +/* for ohmori's setlinewidth patch */ +#include "ghost.h" +#include "gzstate.h" +#include "imemory.h" +#include "igstate.h" + /**************************************************************** * Notes: * ASCII85EncodePages should use ASCIIHexEncode if LanguageLevel < 2. @@ -534,7 +540,21 @@ * (which is given in device pixels) to account for the actual * page scaling in effect. */ + floatp xscale, yscale; + + xscale = fabs(igs->ctm.xx); + yscale = fabs(igs->ctm.xy); + + if (xscale == 0) /* if portrait */ + width = width*yscale; + else + width = width*xscale; + +#if 0 return psdf_setlinewidth(vdev, width * 72.0 / vdev->HWResolution[1]); +#else + return psdf_setlinewidth(vdev, width); +#endif } private int --- gdevpsdf.c.orig Thu Oct 8 01:36:15 1998 +++ gdevpsdf.c Thu Oct 8 02:11:15 1998 @@ -29,6 +29,12 @@ #include "scfx.h" #include "sstring.h" +/* for ohmori's setdash patch */ +#include "math_.h" +#include "ghost.h" +#include "gzstate.h" +#include "imemory.h" +#include "igstate.h" /* Structure descriptor */ public_st_device_psdf(); @@ -68,11 +74,26 @@ { stream *s = gdev_vector_stream(vdev); int i; + floatp scale, xscale, yscale; + + xscale = fabs(igs->ctm.xx); + yscale = fabs(igs->ctm.xy); + + if (xscale == 0) /* if portrait */ + scale = yscale; + else + scale = xscale; pputs(s, "[ "); +#if 0 for (i = 0; i < count; ++i) pprintg1(s, "%g ", pattern[i]); pprintg1(s, "] %g d\n", offset); +#else + for (i = 0; i < count; ++i) + pprintg1(s, "%g ", pattern[i]*scale/vdev->y_pixels_per_inch); + pprintg1(s, "] %g d\n", offset*scale/vdev->x_pixels_per_inch); +#endif return 0; }