diff options
-rw-r--r-- | base/gdevp14.c | 4 | ||||
-rw-r--r-- | xps/xpstile.c | 12 |
2 files changed, 15 insertions, 1 deletions
diff --git a/base/gdevp14.c b/base/gdevp14.c index 1335feed6..76b76ddb2 100644 --- a/base/gdevp14.c +++ b/base/gdevp14.c | |||
@@ -3083,6 +3083,7 @@ pdf14_fill_path(gx_device *dev, const gs_gstate *pgs, | |||
3083 | } | 3083 | } |
3084 | } | 3084 | } |
3085 | #endif | 3085 | #endif |
3086 | pdf14_set_marking_params(dev, &new_pgs); | ||
3086 | code = pdf14_tile_pattern_fill(dev, &new_pgs, ppath, | 3087 | code = pdf14_tile_pattern_fill(dev, &new_pgs, ppath, |
3087 | params, pdcolor, pcpath); | 3088 | params, pdcolor, pcpath); |
3088 | new_pgs.trans_device = NULL; | 3089 | new_pgs.trans_device = NULL; |
@@ -4039,7 +4040,8 @@ pdf14_tile_pattern_fill(gx_device * pdev, const gs_gstate * pgs, | |||
4039 | } | 4040 | } |
4040 | blend_mode = ptile->blending_mode; | 4041 | blend_mode = ptile->blending_mode; |
4041 | memcpy(&save_pdf14_dev, p14dev, sizeof(pdf14_device)); | 4042 | memcpy(&save_pdf14_dev, p14dev, sizeof(pdf14_device)); |
4042 | code = pdf14_push_transparency_group(p14dev->ctx, &rect, 1, 0, 65535, 65535, | 4043 | code = pdf14_push_transparency_group(p14dev->ctx, &rect, 1, 0, (uint16_t)floor(65535 * p14dev->alpha + 0.5), |
4044 | (uint16_t)floor(65535 * p14dev->shape + 0.5), | ||
4043 | blend_mode, 0, 0, n_chan_tile-1, | 4045 | blend_mode, 0, 0, n_chan_tile-1, |
4044 | false, NULL, NULL, pgs_noconst, | 4046 | false, NULL, NULL, pgs_noconst, |
4045 | pdev); | 4047 | pdev); |
diff --git a/xps/xpstile.c b/xps/xpstile.c index 598b6e171..d278bd8fe 100644 --- a/xps/xpstile.c +++ b/xps/xpstile.c | |||
@@ -327,6 +327,7 @@ xps_parse_tiling_brush(xps_context_t *ctx, char *base_uri, xps_resource_t *dict, | |||
327 | gs_client_color gscolor; | 327 | gs_client_color gscolor; |
328 | gs_color_space *cs; | 328 | gs_color_space *cs; |
329 | bool sa; | 329 | bool sa; |
330 | float opacity; | ||
330 | 331 | ||
331 | closure.ctx = ctx; | 332 | closure.ctx = ctx; |
332 | closure.base_uri = base_uri; | 333 | closure.base_uri = base_uri; |
@@ -384,7 +385,18 @@ xps_parse_tiling_brush(xps_context_t *ctx, char *base_uri, xps_resource_t *dict, | |||
384 | gs_setstrokeadjust(ctx->pgs, false); | 385 | gs_setstrokeadjust(ctx->pgs, false); |
385 | gs_makepattern(&gscolor, &gspat, &transform, ctx->pgs, NULL); | 386 | gs_makepattern(&gscolor, &gspat, &transform, ctx->pgs, NULL); |
386 | gs_setpattern(ctx->pgs, &gscolor); | 387 | gs_setpattern(ctx->pgs, &gscolor); |
388 | /* If the tiling brush has an opacity, it was already set in the group | ||
389 | that we are filling. Reset to 1.0 here to avoid double application | ||
390 | when the tiling actually occurs */ | ||
391 | opacity = ctx->pgs->opacity.alpha; | ||
392 | gs_setopacityalpha(ctx->pgs, 1.0); | ||
393 | gs_setfillconstantalpha(ctx->pgs, 1.0); | ||
394 | gs_setstrokeconstantalpha(ctx->pgs, 1.0); | ||
387 | xps_fill(ctx); | 395 | xps_fill(ctx); |
396 | gs_setopacityalpha(ctx->pgs, opacity); | ||
397 | gs_setfillconstantalpha(ctx->pgs, opacity); | ||
398 | gs_setstrokeconstantalpha(ctx->pgs, opacity); | ||
399 | |||
388 | gs_setstrokeadjust(ctx->pgs, sa); | 400 | gs_setstrokeadjust(ctx->pgs, sa); |
389 | gsicc_adjust_profile_rc(cs->cmm_icc_profile_data, -1, "xps_parse_tiling_brush"); | 401 | gsicc_adjust_profile_rc(cs->cmm_icc_profile_data, -1, "xps_parse_tiling_brush"); |
390 | 402 | ||