diff options
-rw-r--r-- | base/gdevp14.c | 8 | ||||
-rw-r--r-- | base/gscms.h | 4 | ||||
-rw-r--r-- | base/gxblend1.c | 8 | ||||
-rw-r--r-- | base/gxdevice.h | 2 | ||||
-rw-r--r-- | devices/gdevbit.c | 7 | ||||
-rw-r--r-- | lib/viewpbm.ps | 6 |
6 files changed, 17 insertions, 18 deletions
diff --git a/base/gdevp14.c b/base/gdevp14.c index cfb596bef..7b4b49414 100644 --- a/base/gdevp14.c +++ b/base/gdevp14.c @@ -2756,7 +2756,7 @@ pdf14_copy_alpha_color(gx_device * dev, const byte * data, int data_x, if (src[num_comp] == 255) { dst_ptr[tag_off] = curr_tag; } else { - dst_ptr[tag_off] = ( dst_ptr[tag_off] |curr_tag ) & ~GS_UNTOUCHED_TAG; + dst_ptr[tag_off] |= curr_tag; } } } @@ -5133,7 +5133,7 @@ pdf14_mark_fill_rectangle(gx_device * dev, int x, int y, int w, int h, if (dst_ptr[planestride] == 255) { dst_ptr[tag_off] = curr_tag; } else { - dst_ptr[tag_off] = ( dst_ptr[tag_off] |curr_tag ) & ~GS_UNTOUCHED_TAG; + dst_ptr[tag_off] |= curr_tag; } } ++dst_ptr; @@ -5257,7 +5257,7 @@ pdf14_mark_fill_rectangle(gx_device * dev, int x, int y, int w, int h, if (dst[num_comp] == 255) { dst_ptr[tag_off] = curr_tag; } else { - dst_ptr[tag_off] = ( dst_ptr[tag_off] |curr_tag ) & ~GS_UNTOUCHED_TAG; + dst_ptr[tag_off] |= curr_tag; } } ++dst_ptr; @@ -5306,7 +5306,7 @@ pdf14_mark_fill_rectangle_ko_simple(gx_device * dev, int x, int y, int w, int h, (has_shape ? planestride : 0); bool has_tags = buf->has_tags; bool additive = pdev->ctx->additive; - gs_graphics_type_tag_t curr_tag = dev->graphics_type_tag & ~GS_DEVICE_ENCODES_TAGS; + gs_graphics_type_tag_t curr_tag = GS_UNKNOWN_TAG; /* Quiet compiler */ gx_color_index mask = ((gx_color_index)1 << 8) - 1; int shift = 8; byte shape = 0; /* Quiet compiler. */ diff --git a/base/gscms.h b/base/gscms.h index fc693af68..a9c7d752c 100644 --- a/base/gscms.h +++ b/base/gscms.h @@ -209,11 +209,11 @@ typedef enum { /* The default is "unknown" which has value 0 and by default devices don't encode tags */ typedef enum { - GS_UNKNOWN_TAG = 0x0, + GS_UNTOUCHED_TAG = 0x0, /* UNTOUCHED *must* be 0 -- transparency code relies on this */ GS_TEXT_TAG = 0x1, GS_IMAGE_TAG = 0x2, GS_PATH_TAG = 0x4, - GS_UNTOUCHED_TAG = 0x8, + GS_UNKNOWN_TAG = 0x40, GS_DEVICE_ENCODES_TAGS = 0x80 } gs_graphics_type_tag_t; diff --git a/base/gxblend1.c b/base/gxblend1.c index 0c68c3713..72c32ee40 100644 --- a/base/gxblend1.c +++ b/base/gxblend1.c @@ -576,12 +576,8 @@ pdf14_compose_group(pdf14_buf *tos, pdf14_buf *nos, pdf14_buf *maskbuf, if (tos_has_tag) { if (pix_alpha == 255) { nos_ptr[nos_tag_offset] = tos_ptr[tos_tag_offset]; - } else if (pix_alpha != 0 && tos_ptr[tos_tag_offset] != - GS_UNTOUCHED_TAG) { - nos_ptr[nos_tag_offset] = - (nos_ptr[nos_tag_offset] | - tos_ptr[tos_tag_offset]) & - ~GS_UNTOUCHED_TAG; + } else if (pix_alpha != 0) { + nos_ptr[nos_tag_offset] |= tos_ptr[tos_tag_offset]; } } } diff --git a/base/gxdevice.h b/base/gxdevice.h index f06282cd4..7f36bc0bc 100644 --- a/base/gxdevice.h +++ b/base/gxdevice.h @@ -131,7 +131,7 @@ BandingAuto /* banding_type */\ }, /*space_params*/\ 0/*Profile Array*/,\ - 0/* graphics_type_tag default GS_UNKNOWN_TAG */,\ + 0/* graphics_type_tag default GS_UNTOUCHED_TAG */,\ { gx_default_install, gx_default_begin_page, gx_default_end_page } /* * We need a number of different variants of the std_device_ macro simply diff --git a/devices/gdevbit.c b/devices/gdevbit.c index 9fbda1b75..dcacd8f3f 100644 --- a/devices/gdevbit.c +++ b/devices/gdevbit.c @@ -547,12 +547,15 @@ bittag_open(gx_device * pdev) return code; } -/* fill the page fills with unmarked white */ +/* + * Fill the page fills with unmarked white, As with the pdf14 device, we treat + * GS_UNTOUCHED_TAG == 0 as an invariant +*/ static int bittag_fillpage(gx_device *dev, gs_gstate * pgs, gx_device_color *pdevc) { return (*dev_proc(dev, fill_rectangle))(dev, 0, 0, dev->width, dev->height, - GS_UNTOUCHED_TAG << 24 | 0xffffff); + 0x00ffffff); /* GS_UNTOUCHED_TAG == 0 */ } static int diff --git a/lib/viewpbm.ps b/lib/viewpbm.ps index 177f22bb6..e6a27d2ab 100644 --- a/lib/viewpbm.ps +++ b/lib/viewpbm.ps @@ -128,10 +128,10 @@ % show the tags as pseudo-color image /ncomp 1 def /invert false def /maxv 1 def [ /Indexed /DeviceRGB 255 - % TEXT=1, IMAGE=2, PATH=4, UNTOUCHED=8 - % red green blue gray + % UNTOUCHED=0, TEXT=1, IMAGE=2, PATH=4 + % gray red green blue 768 string - dup 0 <000000 ff0000 00ff00 ffff00 0000ff ff00ff 00ffff ffffff cccccc> putinterval + dup 0 <cccccc ff0000 00ff00 ffff00 0000ff ff00ff 00ffff ffffff 000000> putinterval ] setcolorspace w h { readstring pop |