xref: /plan9/sys/src/cmd/gs/src/gscolor2.h (revision 593dc095aefb2a85c828727bbfa9da139a49bdf4)
1 /* Copyright (C) 1992, 2000 Aladdin Enterprises.  All rights reserved.
2 
3   This software is provided AS-IS with no warranty, either express or
4   implied.
5 
6   This software is distributed under license and may not be copied,
7   modified or distributed except as expressly authorized under the terms
8   of the license contained in the file LICENSE in this distribution.
9 
10   For more information about licensing, please refer to
11   http://www.ghostscript.com/licensing/. For information on
12   commercial licensing, go to http://www.artifex.com/licensing/ or
13   contact Artifex Software, Inc., 101 Lucas Valley Road #110,
14   San Rafael, CA  94903, U.S.A., +1(415)492-9861.
15 */
16 
17 /* $Id: gscolor2.h,v 1.9 2003/11/11 11:23:17 igor Exp $ */
18 /* Client interface to Level 2 color facilities */
19 /* (requires gscspace.h, gsmatrix.h) */
20 
21 #ifndef gscolor2_INCLUDED
22 #  define gscolor2_INCLUDED
23 
24 #include "gscindex.h"
25 #include "gsptype1.h"
26 
27 /* ---------------- Graphics state ---------------- */
28 
29 /*
30  * Note that setcolorspace and setcolor copy the (top level of) their
31  * structure argument, so if the client allocated it on the heap, the
32  * client should free it after setting it in the graphics state.
33  */
34 
35 /* General color routines */
36 const gs_color_space *gs_currentcolorspace(const gs_state *);
37 int gs_setcolorspace(gs_state *, const gs_color_space *);
38 const gs_client_color *gs_currentcolor(const gs_state *);
39 int gs_setcolor(gs_state *, const gs_client_color *);
40 
41 
42 /* CIE-specific routines */
43 #ifndef gs_cie_render_DEFINED
44 #  define gs_cie_render_DEFINED
45 typedef struct gs_cie_render_s gs_cie_render;
46 #endif
47 const gs_cie_render *gs_currentcolorrendering(const gs_state *);
48 int gs_setcolorrendering(gs_state *, gs_cie_render *);
49 
50 /* High level device support */
51 int gs_includecolorspace(gs_state * pgs, const byte *res_name, int name_length);
52 
53 #endif /* gscolor2_INCLUDED */
54