summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenry Stiles <henry.stiles@artifex.com>2012-03-03 16:41:59 -0700
committerChris Liddell <chris.liddell@artifex.com>2012-03-15 11:54:24 +0000
commit9749779754b914853992e8e17ee2284b9dfb80aa (patch)
tree15001349b4535357ffd5f2877e38af5bf9689546
parent33f73d55002201962b3c012a3e494a3d37c7d9c2 (diff)
Fix 692893 gl/2 rectangles not properly placed.
When resetting the hpgl/2 page parameters we were setting scaling to its default value overriding any setting in the PCL job. HP does not reset the scaling as might be expected.
-rw-r--r--pcl/pginit.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/pcl/pginit.c b/pcl/pginit.c
index 15bd804ca..c068c031b 100644
--- a/pcl/pginit.c
+++ b/pcl/pginit.c
@@ -161,8 +161,18 @@ hpgl_do_reset(
}
/* NB check all of these */
if ((type & pcl_reset_page_params) != 0) {
- /* provide default anchor point, plot size and picture frame size */
+ /* provide default anchor point, plot size and picture frame
+ size. Oddly HP does not reset the scaling parameters
+ when the page size is changed. */
+ int scale_type = pcs->g.scaling_type;
+ hpgl_scaling_params_t params = pcs->g.scaling_params;
+
hpgl_default_coordinate_system(pcs);
+
+ /* restore the scaling parameter. */
+ pcs->g.scaling_type = scale_type;
+ pcs->g.scaling_params = params;
+
hpgl_args_setup(&hpgl_args);
hpgl_IW(&hpgl_args, pcs);
hpgl_args_set_int(&hpgl_args,0);