From 9749779754b914853992e8e17ee2284b9dfb80aa Mon Sep 17 00:00:00 2001 From: Henry Stiles Date: Sat, 3 Mar 2012 16:41:59 -0700 Subject: 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. --- pcl/pginit.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) 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); -- cgit v1.2.3