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: gsccolor.h 8864 2008-07-22 18:32:34Z ray $ */
15
/* Client color structure definition */
17
#ifndef gsccolor_INCLUDED
18
# define gsccolor_INCLUDED
20
#include "gsstype.h" /* for extern_st */
22
/* Pattern instance, usable in color. */
23
#ifndef gs_pattern_instance_DEFINED
24
# define gs_pattern_instance_DEFINED
25
typedef struct gs_pattern_instance_s gs_pattern_instance_t;
29
* Define the maximum number of components in a client color.
30
* This must be at least 4, and should be at least 6 to accommodate
31
* hexachrome DeviceN color spaces. It is currently set to the same
32
* value as Adobe CPSI can handle
34
#ifndef GS_CLIENT_COLOR_MAX_COMPONENTS /* Allow override with XCFLAGS */
35
# define GS_CLIENT_COLOR_MAX_COMPONENTS (8)
38
/* Paint (non-Pattern) colors */
39
typedef struct gs_paint_color_s {
40
float values[GS_CLIENT_COLOR_MAX_COMPONENTS];
41
/* CAUTION: The shading decomposition algorithm may allocate
42
a smaller space when a small number of color components is in use.
47
#ifndef gs_client_color_DEFINED
48
# define gs_client_color_DEFINED
49
typedef struct gs_client_color_s gs_client_color;
52
struct gs_client_color_s {
53
gs_pattern_instance_t *pattern;
54
gs_paint_color paint; /* also color for uncolored pattern */
55
/* CAUTION: gs_paint_color structure must be the last field in
56
gs_client_color_s to allow allocating a smaller space when
57
a small number of color components is in use.
61
extern_st(st_client_color);
62
#define public_st_client_color() /* in gscolor.c */\
63
gs_public_st_ptrs1(st_client_color, gs_client_color, "gs_client_color",\
64
client_color_enum_ptrs, client_color_reloc_ptrs, pattern)
65
#define st_client_color_max_ptrs 1
67
#endif /* gsccolor_INCLUDED */