summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gs/base/gsptype1.c10
-rw-r--r--gs/base/gsptype1.h3
-rw-r--r--gs/base/gxccache.c5
3 files changed, 16 insertions, 2 deletions
diff --git a/gs/base/gsptype1.c b/gs/base/gsptype1.c
index 9e497142f..1249a1084 100644
--- a/gs/base/gsptype1.c
+++ b/gs/base/gsptype1.c
@@ -1974,3 +1974,13 @@ gx_dc_is_pattern1_color(const gx_device_color *pdevc)
{
return (pdevc->type == &gx_dc_pattern || pdevc->type == &gx_dc_pattern_trans);
}
+
+/* Check device color for Pattern Type 1 with transparency involved */
+bool
+gx_dc_is_pattern1_color_with_trans(const gx_device_color *pdevc)
+{
+ if (!(pdevc->type == &gx_dc_pattern || pdevc->type == &gx_dc_pattern_trans)) {
+ return(false);
+ }
+ return(gx_pattern1_get_transptr(pdevc) != NULL);
+}
diff --git a/gs/base/gsptype1.h b/gs/base/gsptype1.h
index 32cf7bd24..b81404b58 100644
--- a/gs/base/gsptype1.h
+++ b/gs/base/gsptype1.h
@@ -91,6 +91,9 @@ const gs_client_pattern *gs_getpattern(const gs_client_color *);
/* Check device color for Pattern Type 1. */
bool gx_dc_is_pattern1_color(const gx_device_color *pdevc);
+/* Check device color for Pattern Type 1 with transparency involved */
+bool gx_dc_is_pattern1_color_with_trans(const gx_device_color *pdevc);
+
/* Get transparency pointer */
void * gx_pattern1_get_transptr(const gx_device_color *pdevc);
/* pattern is clist with transparency */
diff --git a/gs/base/gxccache.c b/gs/base/gxccache.c
index 30fb41825..2cbc77530 100644
--- a/gs/base/gxccache.c
+++ b/gs/base/gxccache.c
@@ -295,8 +295,9 @@ gx_image_cached_char(register gs_show_enum * penum, register cached_char * cc)
* We need to map 4 bitmap bits to 2 alpha bits.
*/
depth = (cc_depth(cc) == 3 ? 2 : cc_depth(cc));
- if (dev_proc(orig_dev, fill_mask) != gx_default_fill_mask ||
- !lop_no_S_is_T(pgs->log_op)
+ if ((dev_proc(orig_dev, fill_mask) != gx_default_fill_mask ||
+ !lop_no_S_is_T(pgs->log_op) &&
+ !gx_dc_is_pattern1_color_with_trans(pdevc))
) {
gx_clip_path *pcpath;