summaryrefslogtreecommitdiff
path: root/base/gsequivc.h
blob: ebd50fb49afdce533ba8fbf6d50132aeb5102d14 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/* Copyright (C) 2001-2012 Artifex Software, Inc.
   All Rights Reserved.

   This software is provided AS-IS with no warranty, either express or
   implied.

   This software is distributed under license and may not be copied,
   modified or distributed except as expressly authorized under the terms
   of the license contained in the file LICENSE in this distribution.

   Refer to licensing information at http://www.artifex.com or contact
   Artifex Software, Inc.,  7 Mt. Lassen Drive - Suite A-134, San Rafael,
   CA  94903, U.S.A., +1(415)492-9861, for further information.
*/


/* Header for routines for determining equivalent color for spot colors */

/* For more information, see comment at the start of src/gsequivc.c */

#ifndef gsequivc_INCLUDED
# define gsequivc_INCLUDED

/*
 * Structure for holding a CMYK color.
 */
typedef struct cmyk_color_s {
    bool color_info_valid;
    frac c;
    frac m;
    frac y;
    frac k;
} cmyk_color;

/* if you make any additions/changes to the equivalent_cmyk_color_params or the
   cmyk_color structrs you need to make the appropriate additions/changes 
   to the compare_equivalent_cmyk_color_params() function in gdevdevn.c */

/*
 * Structure for holding parameters for collecting the equivalent CMYK
 * for a spot colorant.
 */
typedef struct equivalent_cmyk_color_params_s {
    bool all_color_info_valid;
    cmyk_color color[GX_DEVICE_MAX_SEPARATIONS];
} equivalent_cmyk_color_params;

/*
 * If possible, update the equivalent CMYK color for spot colors.
 */
void update_spot_equivalent_cmyk_colors(gx_device * pdev,
                const gs_state * pgs, gs_devn_params * pdevn_params,
                equivalent_cmyk_color_params * pparams);

/*
 * Utiliy routine:  Capture equivalent color when given a modified
 * color space.
 */
void capture_spot_equivalent_cmyk_colors(gx_device * pdev,
                const gs_state * pgs, const gs_client_color * pcc,
                const gs_color_space * pcs, int sep_num,
                equivalent_cmyk_color_params * pparams);

/* Used in named color replacement to detect that we are doing the equivalent
   computation */
bool named_color_equivalent_cmyk_colors(const gs_imager_state * pis);

#endif		/* define gsequivc_INCLUDED */