diff options
author | Henry Stiles <henry.stiles@artifex.com> | 2012-02-14 18:11:15 -0700 |
---|---|---|
committer | Henry Stiles <henry.stiles@artifex.com> | 2012-02-15 11:17:08 -0700 |
commit | 0a0aa751d8cb5d49052a0c4ed3ae38ad66b9fb8e (patch) | |
tree | 7b3427d1d5fa1f9082bb3406c6e6f867212d1e08 | |
parent | 00a96d35b30d77f8dfbc8ae12326c81053fc50c9 (diff) |
Fix 692857, wrong current unit initialization in HPGL/2-RTL.
The code was actually written fixed once correcly but then was broken
with a bad fix (5ad194f) largely because we didn't have good bookkeeping
for the original fix. Hopefully now that we have an associated bug
report and test file a similar problem won't happen again.
-rw-r--r-- | pcl/pcjob.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/pcl/pcjob.c b/pcl/pcjob.c index 55e14ad44..0046d624c 100644 --- a/pcl/pcjob.c +++ b/pcl/pcjob.c @@ -258,8 +258,15 @@ pcjob_do_reset(pcl_state_t *pcs, pcl_reset_type_t type) } if ( type & (pcl_reset_initial | pcl_reset_printer | pcl_reset_overlay) ) { + /* rtl always uses native units for user units. The hp + documentation does not say what to do if the resolution is + assymetric... */ pcl_args_t args; - arg_set_uint(&args, 300); + if ( pcs->personality == rtl ) + arg_set_uint(&args, + (uint)gs_currentdevice(pcs->pgs)->HWResolution[0]); + else + arg_set_uint(&args, 300); pcl_set_unit_of_measure(&args, pcs); } } |