[gs-cvs] rev 8610 - trunk/gs/src
ken at ghostscript.com
ken at ghostscript.com
Wed Mar 26 07:02:03 PDT 2008
Author: ken
Date: 2008-03-26 07:02:02 -0700 (Wed, 26 Mar 2008)
New Revision: 8610
Modified:
trunk/gs/src/gdevvec.c
Log:
Fix (vector device): Operation order could result in failure to
apply clipping.
Details:
Bug #689469 "Incorrect clipping operation in vector output".
>From the patch supplied by Osamu Mihara. In gdev_vector_stroke_path and
gdev_vector_fill_path, clipping was performed after a number of other
operations. If these failed, the clipping was not applied, apparently
causing problems for some devices (eg OpenPrinting Vector Printer).
(gdevvec.c) Execute the clip operation before other operations to ensure
that the clip is applied, even if the later operations fail.
EXPECTED DIFFERENCES:
None.
Modified: trunk/gs/src/gdevvec.c
===================================================================
--- trunk/gs/src/gdevvec.c 2008-03-25 05:26:24 UTC (rev 8609)
+++ trunk/gs/src/gdevvec.c 2008-03-26 14:02:02 UTC (rev 8610)
@@ -1055,8 +1055,8 @@
{
int code;
- if ((code = gdev_vector_prepare_fill(vdev, pis, params, pdevc)) < 0 ||
- (code = gdev_vector_update_clip_path(vdev, pcpath)) < 0 ||
+ if ((code = gdev_vector_update_clip_path(vdev, pcpath)) < 0 ||
+ (code = gdev_vector_prepare_fill(vdev, pis, params, pdevc)) < 0 ||
(vdev->bbox_device &&
(code = (*dev_proc(vdev->bbox_device, fill_path))
((gx_device *) vdev->bbox_device, pis, ppath, params,
@@ -1082,9 +1082,9 @@
int set_ctm;
gs_matrix mat;
- if ((set_ctm = gdev_vector_stroke_scaling(vdev, pis, &scale, &mat)) != 0 ||
+ if ((code = gdev_vector_update_clip_path(vdev, pcpath)) < 0 ||
+ (set_ctm = gdev_vector_stroke_scaling(vdev, pis, &scale, &mat)) != 0 ||
(code = gdev_vector_prepare_stroke(vdev, pis, params, pdcolor, scale)) < 0 ||
- (code = gdev_vector_update_clip_path(vdev, pcpath)) < 0 ||
(vdev->bbox_device &&
(code = (*dev_proc(vdev->bbox_device, stroke_path))
((gx_device *) vdev->bbox_device, pis, ppath, params,
More information about the gs-cvs
mailing list