summaryrefslogtreecommitdiff
path: root/pcl/rtgmode.c
diff options
context:
space:
mode:
authorJan Stockenius <jan@ghostscript.com>1999-03-16 08:35:02 +0000
committerJan Stockenius <jan@ghostscript.com>1999-03-16 08:35:02 +0000
commitbbdbd6bf9a15f4b163b86db02804f1375505f291 (patch)
tree637b6139b1f2cdef7f5c0cac864c6953ef59c9a7 /pcl/rtgmode.c
parent93020b0fb41b4b5121028915ca59b7a3d822818e (diff)
Fix to properly clip rasters. A detailed explanation of this change
is in the header file pcl/rtrstst.h, item 4. git-svn-id: http://svn.ghostscript.com/ghostpcl/trunk/ghostpcl@772 06663e23-700e-0410-b217-a244a6096597
Diffstat (limited to 'pcl/rtgmode.c')
-rw-r--r--pcl/rtgmode.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/pcl/rtgmode.c b/pcl/rtgmode.c
index 43735c6e4..4532fc808 100644
--- a/pcl/rtgmode.c
+++ b/pcl/rtgmode.c
@@ -168,8 +168,16 @@ pcl_enter_graphics_mode(
int rot;
int code = 0;
- /* determine the orientation of raster space */
- rot = pcs->xfm_state.lp_orient + pcs->xfm_state.print_dir;
+ /*
+ * Check if the raster is to be clipped fully; see rtrstst.h for details.
+ * Since this is a discontinuous effect, the equality checks below
+ * should be made while still in centipoings.
+ */
+ prstate->clip_all = ( (pcl_cap.x == pxfmst->pd_size.x) ||
+ (pcl_cap.y == pxfmst->pd_size.y) );
+
+ /* create to raster space to logical page space transformation */
+ rot = pxfmst->lp_orient + pxfmst->print_dir;
if (prstate->pres_mode_3)
rot &= 0x2;
rot = (rot - pxfmst->lp_orient) & 0x3;