1
/* Copyright (C) 2001-2006 Artifex Software, Inc.
4
This software is provided AS-IS with no warranty, either express or
7
This software is distributed under license and may not be copied, modified
8
or distributed except as expressly authorized under the terms of that
9
license. Refer to licensing information at http://www.artifex.com/
10
or contact Artifex Software, Inc., 7 Mt. Lassen Drive - Suite A-134,
11
San Rafael, CA 94903, U.S.A., +1(415)492-9861, for further information.
14
/* $Id: icie.h 8022 2007-06-05 22:23:38Z giles $ */
15
/* Internal definitions for interpreter CIE color handling */
18
# define icie_INCLUDED
21
* All of the routines below are exported by zcie.c for zcrd.c,
22
* except for cie_cache_joint which is exported by zcrd.c for zcie.c.
25
/* ------ Parameter acquisition ------ */
27
/* Get a range array parameter from a dictionary. */
28
/* We know that count <= 4. */
29
int dict_ranges_param(const gs_memory_t *mem,
30
const ref * pdref, const char *kstr, int count,
33
/* Get 3 ranges from a dictionary. */
34
int dict_range3_param(const gs_memory_t *mem,
35
const ref *pdref, const char *kstr,
38
/* Get a 3x3 matrix parameter from a dictionary. */
39
int dict_matrix3_param(const gs_memory_t *mem, const ref *pdref,
43
/* Get an array of procedures from a dictionary. */
44
/* We know count <= countof(empty_procs). */
45
int dict_proc_array_param(const gs_memory_t *mem, const ref *pdict,
47
uint count, ref * pparray);
49
/* Get 3 procedures from a dictionary. */
50
int dict_proc3_param(const gs_memory_t *mem, const ref *pdref,
51
const char *kstr, ref proc3[3]);
53
/* Get WhitePoint and BlackPoint values. */
54
int cie_points_param(const gs_memory_t *mem,
55
const ref * pdref, gs_cie_wb * pwb);
57
/* Process a 3- or 4-dimensional lookup table from a dictionary. */
58
/* The caller has set pclt->n and pclt->m. */
59
/* ptref is known to be a readable array of size at least n+1. */
60
int cie_table_param(const ref * ptable, gx_color_lookup_table * pclt,
63
/* ------ Internal routines ------ */
65
int cie_set_finish(i_ctx_t *, gs_color_space *,
66
const ref_cie_procs *, int, int);
68
int cie_cache_push_finish(i_ctx_t *i_ctx_p, op_proc_t finish_proc,
69
gs_ref_memory_t * imem, void *data);
70
int cie_prepare_cache(i_ctx_t *i_ctx_p, const gs_range * domain,
71
const ref * proc, cie_cache_floats * pcache,
72
void *container, gs_ref_memory_t * imem,
74
int cie_prepare_caches_4(i_ctx_t *i_ctx_p, const gs_range * domains,
76
cie_cache_floats * pc0,
77
cie_cache_floats * pc1,
78
cie_cache_floats * pc2,
79
cie_cache_floats * pc3 /* may be 0 */,
81
gs_ref_memory_t * imem, client_name_t cname);
82
#define cie_prepare_cache3(p,d3,p3,c3,pcie,imem,cname)\
83
cie_prepare_caches_4(p, (d3)->ranges, p3,\
84
&(c3)->floats, &(c3)[1].floats, &(c3)[2].floats,\
85
NULL, pcie, imem, cname)
86
#define cie_prepare_cache4(p,d4,p4,c4,pcie,imem,cname)\
87
cie_prepare_caches_4(p, (d4)->ranges, p4,\
88
&(c4)->floats, &(c4)[1].floats, &(c4)[2].floats,\
89
&(c4)[3].floats, pcie, imem, cname)
91
int cie_cache_joint(i_ctx_t *, const ref_cie_render_procs *,
92
const gs_cie_common *, gs_state *);
94
#endif /* icie_INCLUDED */