summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'base/gdevp14.h')
-rw-r--r--base/gdevp14.h42
1 files changed, 24 insertions, 18 deletions
diff --git a/base/gdevp14.h b/base/gdevp14.h
index e4d4dfaa..635ab111 100644
--- a/base/gdevp14.h
+++ b/base/gdevp14.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2019 Artifex Software, Inc.
+/* Copyright (C) 2001-2020 Artifex Software, Inc.
All Rights Reserved.
This software is provided AS-IS with no warranty, either express or
@@ -97,18 +97,15 @@ struct pdf14_mask_s {
};
-/* A structure to hold information
- * about the parent color related
- * procs and other information.
- * These may change depending upon
- * if the blending space is different
- * than the base space. The structure
- * is a list that is updated upon
- * every transparency group push and pop */
+/* A structure to hold information about the group color related
+ * procs and other information. These may change depending upon
+ * if the blending space is different than the base space.
+ * The structure is a list that is updated upo every transparency
+ * group push and pop */
-typedef struct pdf14_parent_color_s pdf14_parent_color_t;
+typedef struct pdf14_group_color_s pdf14_group_color_t;
-struct pdf14_parent_color_s {
+struct pdf14_group_color_s {
int num_components;
bool isadditive;
gx_color_polarity_t polarity;
@@ -119,14 +116,14 @@ struct pdf14_parent_color_s {
uint max_color; /* Causes issues if these are not maintained */
const gx_color_map_procs *(*get_cmap_procs)(const gs_gstate *,
const gx_device *);
- const gx_cm_color_map_procs *(*parent_color_mapping_procs)(const gx_device *);
+ const gx_cm_color_map_procs *(*group_color_mapping_procs)(const gx_device *);
gx_color_index (*encode)(gx_device *, const gx_color_value value[]);
int (*decode)(gx_device *, gx_color_index, gx_color_value *);
- int (*parent_color_comp_index)(gx_device *, const char *, int, int);
+ int (*group_color_comp_index)(gx_device *, const char *, int, int);
const pdf14_procs_t * unpack_procs;
- const pdf14_nonseparable_blending_procs_t * parent_blending_procs;
+ const pdf14_nonseparable_blending_procs_t * blend_procs;
cmm_profile_t *icc_profile; /* Opaque to GC. Allocated in non-gc memory */
- pdf14_parent_color_t *previous;
+ pdf14_group_color_t *previous;
};
typedef struct pdf14_ctx_s pdf14_ctx;
@@ -137,6 +134,7 @@ struct pdf14_buf_s {
bool isolated;
bool knockout;
uint16_t alpha;
+ uint16_t opacity;
uint16_t shape;
gs_blend_mode_t blend_mode;
int num_spots; /* helpful when going between Gray+spots, RGB+spots, CMYK+spots */
@@ -145,7 +143,9 @@ struct pdf14_buf_s {
bool has_tags;
bool deep; /* false => 8 bits, true => 16 bits */
bool page_group;
-
+ bool group_popped; /* Can occur in cases where clist created shading groups */
+ /* If there is a group and is pushed and popped, with
+ nothing drawn AND the clist created shading groups */
gs_int_rect rect;
/* Note: the traditional GS name for rowstride is "raster" */
@@ -168,7 +168,7 @@ struct pdf14_buf_s {
gs_transparency_mask_subtype_t SMask_SubType;
uint mask_id;
- pdf14_parent_color_t *parent_color_info;
+ pdf14_group_color_t *group_color_info;
gs_transparency_color_t color_space; /* Different groups can have different spaces for blending */
gs_memory_t *memory;
@@ -189,6 +189,9 @@ struct pdf14_ctx_s {
int smask_depth; /* used to catch smasks embedded in smasks. bug691803 */
bool smask_blend;
bool deep; /* If true, 16 bit data, false, 8 bit data. */
+ bool has_tags;
+ int num_spots;
+ pdf14_group_color_t* base_color;
};
typedef struct gs_pdf14trans_params_s gs_pdf14trans_params_t;
@@ -208,6 +211,7 @@ typedef struct pdf14_device_s {
pdf14_ctx *ctx;
pdf14_smaskcolor_t *smaskcolor;
+ bool ais;
float opacity;
float shape;
float alpha; /* alpha = opacity * shape */
@@ -266,7 +270,7 @@ typedef struct pdf14_device_s {
dev_proc_get_color_mapping_procs(*my_get_color_mapping_procs);
dev_proc_get_color_comp_index(*my_get_color_comp_index);
- pdf14_parent_color_t *trans_group_parent_cmap_procs;
+ pdf14_group_color_t *color_model_stack;
} pdf14_device_t;
@@ -316,4 +320,6 @@ int gs_pdf14_device_color_mon_set(gx_device *pdev, bool monitoring);
/* depth are critical since these must match when reading back colors. */
bool pdf14_ok_to_optimize(gx_device *bdev);
+
+
#endif /* gdevp14_INCLUDED */