11
11
San Rafael, CA 94903, U.S.A., +1(415)492-9861, for further information.
14
/* $Id: gsistate.c 11548 2010-07-28 18:44:46Z robin $ */
15
15
/* Imager state housekeeping */
17
17
#include "gserrors.h"
45
45
ENUM_PTRS_WITH(line_params_enum_ptrs, gx_line_params *plp) return 0;
46
46
case 0: return ENUM_OBJ((plp->dash.pattern_size == 0 ?
47
NULL : plp->dash.pattern));
47
NULL : plp->dash.pattern));
49
49
static RELOC_PTRS_WITH(line_params_reloc_ptrs, gx_line_params *plp)
51
51
if (plp->dash.pattern_size)
52
RELOC_VAR(plp->dash.pattern);
52
RELOC_VAR(plp->dash.pattern);
54
54
private_st_line_params();
108
107
/* Color rendering state */
109
108
pis->halftone = 0;
113
for (i = 0; i < gs_color_select_count; ++i)
114
pis->screen_phase[i].x = pis->screen_phase[i].y = 0;
112
for (i = 0; i < gs_color_select_count; ++i)
113
pis->screen_phase[i].x = pis->screen_phase[i].y = 0;
117
116
pis->cie_render = 0;
120
119
pis->undercolor_removal = 0;
121
120
/* Allocate an initial transfer map. */
122
121
rc_alloc_struct_n(pis->set_transfer.gray,
123
gx_transfer_map, &st_transfer_map,
124
mem, return_error(gs_error_VMerror),
125
"gs_imager_state_init(transfer)", 1);
122
gx_transfer_map, &st_transfer_map,
123
mem, return_error(gs_error_VMerror),
124
"gs_imager_state_init(transfer)", 1);
126
125
pis->set_transfer.gray->proc = gs_identity_transfer;
127
126
pis->set_transfer.gray->id = gs_next_ids(pis->memory, 1);
128
127
pis->set_transfer.gray->values[0] = frac_0;
129
128
pis->set_transfer.red =
130
pis->set_transfer.green =
131
pis->set_transfer.blue = NULL;
129
pis->set_transfer.green =
130
pis->set_transfer.blue = NULL;
132
131
for (i = 0; i < GX_DEVICE_COLOR_MAX_COMPONENTS; i++)
133
pis->effective_transfer[i] = pis->set_transfer.gray;
132
pis->effective_transfer[i] = pis->set_transfer.gray;
134
133
pis->cie_joint_caches = NULL;
135
134
pis->cie_joint_caches_alt = NULL;
136
135
pis->cmap_procs = cmap_procs_default;
153
152
gs_imager_state_copy(const gs_imager_state * pis, gs_memory_t * mem)
155
154
gs_imager_state *pis_copy =
156
gs_alloc_struct(mem, gs_imager_state, &st_imager_state,
157
"gs_imager_state_copy");
155
gs_alloc_struct(mem, gs_imager_state, &st_imager_state,
156
"gs_imager_state_copy");
161
pis_copy->transparency_stack = 0;
160
pis_copy->transparency_stack = 0;
236
235
* dependent structures as well.
238
237
if (pdht != 0 && pdht->rc.ref_count == 1) {
239
gx_device_halftone_release(pdht, pdht->rc.memory);
238
gx_device_halftone_release(pdht, pdht->rc.memory);
242
241
RCDECR(halftone);