diff options
author | Ray Johnston <ray.johnston@artifex.com> | 2012-05-01 01:41:18 -0700 |
---|---|---|
committer | Ray Johnston <ray.johnston@artifex.com> | 2012-05-01 01:48:20 -0700 |
commit | c51dd0ad9b442a05844e1b8eb3e4b511af8c0392 (patch) | |
tree | b99c7d257d71815ef6410a94981f7a50b9dc8090 | |
parent | af102f5fe9a91a071b2d01c3e8ee35a0c99275ea (diff) |
Optimize transparency bbox for image SMask.
SMask with GreyBackground != 1.0 needs to use parent bbox, but image
SMask only paint the image area so the BC cannot affect areas outside.
-rw-r--r-- | gs/base/gdevp14.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/gs/base/gdevp14.c b/gs/base/gdevp14.c index 2e653ceea..83e634e05 100644 --- a/gs/base/gdevp14.c +++ b/gs/base/gdevp14.c @@ -7345,9 +7345,9 @@ c_pdf14trans_get_cropping(const gs_composite_t *pcte, int *ry, int *rheight, code = pdf14_compute_group_device_int_rect(&pdf14pct->params.ctm, &pdf14pct->params.bbox, &rect); - /* We have to crop this by the parent object and worry about the - BC outside the range */ - if ( pdf14pct->params.GrayBackground == 1.0 ) { + /* We have to crop this by the parent object and worry about the BC outside + the range, except for image SMask which don't affect areas outside the image */ + if ( pdf14pct->params.GrayBackground == 1.0 || pdf14pct->params.mask_is_image) { /* In this case there will not be a background effect to worry about. The mask will not have any effect outside the bounding box. This is NOT the default or common case. */ @@ -7693,4 +7693,4 @@ pdf14_debug_mask_stack_state(pdf14_ctx *ctx) } #endif -#endif
\ No newline at end of file +#endif /* DUMP_MASK_STACK */ |