1 /* Copyright (C) 1993, 1998, 1999 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: gsccolor.h,v 1.5 2002/08/22 07:12:28 henrys Exp $ */ 18 /* Client color structure definition */ 19 20 #ifndef gsccolor_INCLUDED 21 # define gsccolor_INCLUDED 22 23 #include "gsstype.h" /* for extern_st */ 24 25 /* Pattern instance, usable in color. */ 26 #ifndef gs_pattern_instance_DEFINED 27 # define gs_pattern_instance_DEFINED 28 typedef struct gs_pattern_instance_s gs_pattern_instance_t; 29 #endif 30 31 /* 32 * Define the maximum number of components in a client color. 33 * This must be at least 4, and should be at least 6 to accommodate 34 * hexachrome DeviceN color spaces. 35 */ 36 #define GS_CLIENT_COLOR_MAX_COMPONENTS 16 37 38 /* Paint (non-Pattern) colors */ 39 typedef struct gs_paint_color_s { 40 float values[GS_CLIENT_COLOR_MAX_COMPONENTS]; 41 } gs_paint_color; 42 43 /* General colors */ 44 #ifndef gs_client_color_DEFINED 45 # define gs_client_color_DEFINED 46 typedef struct gs_client_color_s gs_client_color; 47 48 #endif 49 struct gs_client_color_s { 50 gs_paint_color paint; /* also color for uncolored pattern */ 51 gs_pattern_instance_t *pattern; 52 }; 53 54 extern_st(st_client_color); 55 #define public_st_client_color() /* in gscolor.c */\ 56 gs_public_st_ptrs1(st_client_color, gs_client_color, "gs_client_color",\ 57 client_color_enum_ptrs, client_color_reloc_ptrs, pattern) 58 #define st_client_color_max_ptrs 1 59 60 #endif /* gsccolor_INCLUDED */ 61