[gs-cvs] rev 7228 - trunk/gs/src
raph at ghostscript.com
raph at ghostscript.com
Mon Nov 27 15:56:22 PST 2006
Author: raph
Date: 2006-11-27 15:56:22 -0800 (Mon, 27 Nov 2006)
New Revision: 7228
Modified:
trunk/gs/src/gxpath2.c
Log:
Reverses order of subpaths in gx_path_copy_reversed, which is the
implementation of the reversepath operator. PLRM3 says that the order
of subpaths is unspecified, but CPSI reverses them, while old GS had
them in the same order as the original path. Fixes CET 11-05-6, 11-14-5,
11-22-7, and 11-28-11.
Modified: trunk/gs/src/gxpath2.c
===================================================================
--- trunk/gs/src/gxpath2.c 2006-11-27 23:21:36 UTC (rev 7227)
+++ trunk/gs/src/gxpath2.c 2006-11-27 23:56:22 UTC (rev 7228)
@@ -319,11 +319,14 @@
* 5.02, the code follows the Adobe implementation (and LanguageLevel 3
* specification), in which this line becomes the *last* segment of the
* reversed path. This can produce some quite unintuitive results.
+ *
+ * The order of the subpaths is unspecified in the PLRM, but the CPSI
+ * reverses the subpaths, and the CET (11-05 p6, test 3) tests for it.
*/
int
gx_path_copy_reversed(const gx_path * ppath_old, gx_path * ppath)
{
- const subpath *psub = ppath_old->first_subpath;
+ const subpath *psub = ppath_old->current_subpath;
#ifdef DEBUG
if (gs_debug_c('P'))
@@ -367,7 +370,9 @@
if (code < 0)
return code;
}
- psub = (const subpath *)psub->last->next;
+ do {
+ psub = (const subpath *)psub->prev;
+ } while (psub && psub->type != s_start);
goto nsp;
case s_curve:
{
More information about the gs-cvs
mailing list