[gs-commits] ghostpdl branch, pdfi, updated. jbig2dec-0.14-2103-g92f996b
[email protected] (Nancy Durgin)
| Newsgroups | gmane.comp.printing.ghostscript.cvs |
|---|---|
| Message-ID | <[email protected]> |
The ghostpdl branch, pdfi has been updated
via 92f996b3942fcf1075a074a26beee49dfae20f12 (commit)
from 91629d8b919ad826c356298669ade326b88f5e78 (commit)
----------------------------------------------------------------------
commit 92f996b3942fcf1075a074a26beee49dfae20f12
Author: Nancy Durgin <[email protected]>
Date: Wed Aug 7 15:36:21 2019 -0700
Use gs_setgstate() instead of gs_copystate().
This preserves the ->level and seems to work fine.
diff --git a/pdf/pdf_pattern.c b/pdf/pdf_pattern.c
index f977609..04d3450 100644
--- a/pdf/pdf_pattern.c
+++ b/pdf/pdf_pattern.c
@@ -280,27 +280,14 @@ pdfi_pattern_paintproc(const gs_client_color *pcc, gs_gstate *pgs)
static int
pdfi_pattern_gset(pdf_context *ctx)
{
- int code, level;
+ int code;
float strokealpha, fillalpha;
strokealpha = gs_getstrokeconstantalpha(ctx->pgs);
fillalpha = gs_getfillconstantalpha(ctx->pgs);
- /* TODO: Apparently gs_copygstate() isn't really the right thing, especially considering
- ken's comment below. Need to figure this out!
- */
- /* gs_copygstate also copies the save depth, this seems to me like a bad idea!
- * It certainly causes problems for us because we pay attention to the save depth
- * when processing pdfi_gsave/pdfi_grestore and also at the end of processing
- * content streams. Because we now use pdfi_gsave/grestore instead of the
- * graphics library gs_gsave/grestore, we must ensure that the save level
- * doesn't get overwritten.
- */
- /* TODO: Hack? Save the things we don't want to overwrite... */
- level = ctx->pgs->level;
- code = gs_copygstate(ctx->pgs, pdfi_get_DefaultQState(ctx));
- /* TODO: Hack? Put back the things we don't want to overwrite... */
- ctx->pgs->level = level;
+ /* This will preserve the ->level and a couple other things */
+ code = gs_setgstate(ctx->pgs, pdfi_get_DefaultQState(ctx));
if (code < 0)
goto exit;
Summary of changes:
pdf/pdf_pattern.c | 19 +++----------------
1 file changed, 3 insertions(+), 16 deletions(-)