upath and clippath interaction.
Alex Cherepanov <[email protected]> Wed, 08 Nov 2006 08:39:32 -0500
| Newsgroups | gmane.comp.printing.ghostscript.patches |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format.
--------------020106030209070506070708
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
upath operator fails on Adobe interpreters when currentpoint is not set.
This is tested by CET 11-08 and a number of other files. The proposed
patch brings upath operator into compliance with Adobe.
However, this change also causes a few regressions in CET suite.
Adobe clippath operator sets the currentpoint but our doesn't.
A few CET files use upath after clippath.
Fixing clippath may take some time. Should I commit the fix for upath
now? The net difference is progression.
--------------020106030209070506070708
Content-Type: text/plain;
name="zupath.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="zupath.diff"
Index: gs/src/zupath.c
===================================================================
--- gs/src/zupath.c (revision 7161)
+++ gs/src/zupath.c (working copy)
@@ -456,6 +456,11 @@
ref *next;
int code;
+ /* Although PLRM doesn't list nocurrentpoint as a possible error */
+ /* from 'upath', we follow Adobe implementation and CET 11-08.PS */
+ if (!pgs->current_point_valid)
+ return_error(e_nocurrentpoint);
+
/* Compute the size of the user path array. */
{
gs_fixed_point pts[3];
@@ -492,16 +497,8 @@
} {
gs_rect bbox;
- if ((code = gs_upathbbox(pgs, &bbox, true)) < 0) {
- /*
- * Note: Adobe throws 'nocurrentpoint' error, but the PLRM
- * not list this as a possible error from 'upath', so we
- * set a reasonable default bbox instead.
- */
- if (code != e_nocurrentpoint)
- return code;
- bbox.p.x = bbox.p.y = bbox.q.x = bbox.q.y = 0;
- }
+ if ((code = gs_upathbbox(pgs, &bbox, true)) < 0)
+ return code;
make_real_new(next, bbox.p.x);
make_real_new(next + 1, bbox.p.y);
make_real_new(next + 2, bbox.q.x);
--------------020106030209070506070708
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
gs-code-review mailing list
[email protected]
http://www.ghostscript.com/mailman/listinfo/gs-code-review
--------------020106030209070506070708--