[gs-cvs] rev 6994 - trunk/gs/src
dan at ghostscript.com
dan at ghostscript.com
Tue Aug 15 17:09:38 PDT 2006
Author: dan
Date: 2006-08-15 17:09:37 -0700 (Tue, 15 Aug 2006)
New Revision: 6994
Modified:
trunk/gs/src/zupath.c
Log:
The ustrokepath operator has an optional matrix parameter.
This matrix is concatenated to the CTM. The specified path
is then stroked. This change restores the original CTM after
the path has been stroked. Fixes the much25 test on page 2
of the CET test file 10-15.ps.
Modified: trunk/gs/src/zupath.c
===================================================================
--- trunk/gs/src/zupath.c 2006-08-14 23:05:38 UTC (rev 6993)
+++ trunk/gs/src/zupath.c 2006-08-16 00:09:37 UTC (rev 6994)
@@ -404,8 +404,11 @@
zustrokepath(i_ctx_t *i_ctx_p)
{
gx_path save;
- int code, npop;
+ gs_matrix saved_matrix;
+ int npop, code = gs_currentmatrix(igs, &saved_matrix);
+ if (code < 0)
+ return code;
/* Save and reset the path. */
gx_path_init_local(&save, imemory);
gx_path_assign_preserve(&save, igs->path);
@@ -415,6 +418,15 @@
gx_path_assign_free(igs->path, &save);
return code;
}
+ /*
+ * If a matrix was specified then restore the previous matrix.
+ */
+ if (npop > 1) {
+ if ((code = gs_setmatrix(igs, &saved_matrix)) < 0) {
+ gx_path_assign_free(igs->path, &save);
+ return code;
+ }
+ }
gx_path_free(&save, "ustrokepath");
pop(npop);
return 0;
More information about the gs-cvs
mailing list