1 /* Copyright (C) 2001-2019 Artifex Software, Inc. 2 All Rights Reserved. 3 4 This software is provided AS-IS with no warranty, either express or 5 implied. 6 7 This software is distributed under license and may not be copied, 8 modified or distributed except as expressly authorized under the terms 9 of the license contained in the file LICENSE in this distribution. 10 11 Refer to licensing information at http://www.artifex.com or contact 12 Artifex Software, Inc., 1305 Grant Avenue - Suite 200, Novato, 13 CA 94945, U.S.A., +1(415)492-9861, for further information. 14 */ 15 16 17 /* Definition of transfer mapping function */ 18 /* (also used for black generation and undercolor removal) */ 19 20 #ifndef gxtmap_INCLUDED 21 # define gxtmap_INCLUDED 22 23 /* Common definition for mapping procedures. */ 24 /* These are used for transfer functions, black generation, */ 25 /* and undercolor removal. */ 26 /* gx_transfer_map should probably be renamed gx_mapping_cache.... */ 27 28 /* Define an abstract type for a transfer map. */ 29 typedef struct gx_transfer_map_s gx_transfer_map; 30 31 /* 32 * Define the type of a mapping procedure. There are two forms of this. 33 * The original form passed only the transfer map itself as an argument: 34 */ 35 typedef float (*gs_mapping_proc) (double, const gx_transfer_map *); 36 37 /* 38 * Later, we recognized that this procedure should really be a general 39 * closure: 40 */ 41 typedef float (*gs_mapping_closure_proc_t) (double value, 42 const gx_transfer_map * pmap, 43 const void *proc_data); 44 typedef struct gs_mapping_closure_s { 45 gs_mapping_closure_proc_t proc; 46 const void *data; 47 } gs_mapping_closure_t; 48 49 #endif /* gxtmap_INCLUDED */ 50