1 /* Copyright (C) 1993, 1998, 1999 artofcode LLC. All rights reserved. 2 3 This program is free software; you can redistribute it and/or modify it 4 under the terms of the GNU General Public License as published by the 5 Free Software Foundation; either version 2 of the License, or (at your 6 option) any later version. 7 8 This program is distributed in the hope that it will be useful, but 9 WITHOUT ANY WARRANTY; without even the implied warranty of 10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 General Public License for more details. 12 13 You should have received a copy of the GNU General Public License along 14 with this program; if not, write to the Free Software Foundation, Inc., 15 59 Temple Place, Suite 330, Boston, MA, 02111-1307. 16 17 */ 18 19 /*$Id: gsccolor.h,v 1.2.6.1.2.1 2003/01/17 00:49:02 giles Exp $ */ 20 /* Client color structure definition */ 21 22 #ifndef gsccolor_INCLUDED 23 # define gsccolor_INCLUDED 24 25 #include "gsstype.h" /* for extern_st */ 26 27 /* Pattern instance, usable in color. */ 28 #ifndef gs_pattern_instance_DEFINED 29 # define gs_pattern_instance_DEFINED 30 typedef struct gs_pattern_instance_s gs_pattern_instance_t; 31 #endif 32 33 /* 34 * Define the maximum number of components in a client color. 35 * This must be at least 4, and should be at least 6 to accommodate 36 * hexachrome DeviceN color spaces. 37 */ 38 #define GS_CLIENT_COLOR_MAX_COMPONENTS 6 39 40 /* Paint (non-Pattern) colors */ 41 typedef struct gs_paint_color_s { 42 float values[GS_CLIENT_COLOR_MAX_COMPONENTS]; 43 } gs_paint_color; 44 45 /* General colors */ 46 #ifndef gs_client_color_DEFINED 47 # define gs_client_color_DEFINED 48 typedef struct gs_client_color_s gs_client_color; 49 50 #endif 51 struct gs_client_color_s { 52 gs_paint_color paint; /* also color for uncolored pattern */ 53 gs_pattern_instance_t *pattern; 54 }; 55 56 extern_st(st_client_color); 57 #define public_st_client_color() /* in gscolor.c */\ 58 gs_public_st_ptrs1(st_client_color, gs_client_color, "gs_client_color",\ 59 client_color_enum_ptrs, client_color_reloc_ptrs, pattern) 60 #define st_client_color_max_ptrs 1 61 62 #endif /* gsccolor_INCLUDED */ 63