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: gscsepr.h,v 1.8 2002/08/22 07:12:29 henrys Exp $ */ 18 /* Client interface to Separation color */ 19 20 #ifndef gscsepr_INCLUDED 21 # define gscsepr_INCLUDED 22 23 #include "gscspace.h" 24 25 26 /* 27 * Separation color spaces. 28 * 29 * With the implementation of full DeviceN support, the API for creating 30 * A Separation color space object has changed. Separation color spaces 31 * are treated as a single component version of a DeviceN color space. 32 * The /All separation and the /None separation are the only exceptions. 33 * The /All separation and the /None separation is each treated as its own 34 * case and thus forms the majority of the remaining Separation color space 35 * code. 36 * 37 * The earlier API which had a multi element cache has been removed. 38 * The tint transform procedure now is executed as required and must 39 * be executable without doing a call out. 40 */ 41 extern int gs_cspace_build_Separation( 42 gs_color_space ** ppcspace, 43 gs_separation_name sname, 44 const gs_color_space * palt_cspace, 45 int cache_size, 46 gs_memory_t * pmem 47 ); 48 /* 49 * This routine builds the central part of the Separation color space. 50 * It does not allocate a structure for the color space or initialize it. 51 */ 52 extern int gs_build_Separation( 53 gs_color_space * pcspace, 54 const gs_color_space * palt_cspace, 55 gs_memory_t * pmem 56 ); 57 58 /* Set the Separation tint transformation procedure to a Function. */ 59 #ifndef gs_function_DEFINED 60 typedef struct gs_function_s gs_function_t; 61 # define gs_function_DEFINED 62 #endif 63 int gs_cspace_set_sepr_proc(gs_color_space * pcspace, 64 int (*proc)(const float *, 65 float *, 66 const gs_imager_state *, 67 void * 68 ), 69 void *proc_data 70 ); 71 /* 72 * Set the Separation tint transformation procedure to a Function. 73 */ 74 int gs_cspace_set_sepr_function(const gs_color_space *pcspace, 75 gs_function_t *pfn); 76 /* 77 * If the Separation tint transformation procedure is a Function, 78 * return the function object, otherwise return 0. 79 */ 80 gs_function_t *gs_cspace_get_sepr_function(const gs_color_space *pcspace); 81 82 #endif /* gscsepr_INCLUDED */ 83