gxtmap.h 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /* Copyright (C) 1994, 1998 Aladdin Enterprises. All rights reserved.
  2. This file is part of AFPL Ghostscript.
  3. AFPL Ghostscript is distributed with NO WARRANTY OF ANY KIND. No author or
  4. distributor accepts any responsibility for the consequences of using it, or
  5. for whether it serves any particular purpose or works at all, unless he or
  6. she says so in writing. Refer to the Aladdin Free Public License (the
  7. "License") for full details.
  8. Every copy of AFPL Ghostscript must include a copy of the License, normally
  9. in a plain ASCII text file named PUBLIC. The License grants you the right
  10. to copy, modify and redistribute AFPL Ghostscript, but only under certain
  11. conditions described in the License. Among other things, the License
  12. requires that the copyright notice and this notice be preserved on all
  13. copies.
  14. */
  15. /*$Id: gxtmap.h,v 1.2 2000/09/19 19:00:40 lpd Exp $ */
  16. /* Definition of transfer mapping function */
  17. /* (also used for black generation and undercolor removal) */
  18. #ifndef gxtmap_INCLUDED
  19. # define gxtmap_INCLUDED
  20. /* Common definition for mapping procedures. */
  21. /* These are used for transfer functions, black generation, */
  22. /* and undercolor removal. */
  23. /* gx_transfer_map should probably be renamed gx_mapping_cache.... */
  24. /* Define an abstract type for a transfer map. */
  25. typedef struct gx_transfer_map_s gx_transfer_map;
  26. /*
  27. * Define the type of a mapping procedure. There are two forms of this.
  28. * The original form passed only the transfer map itself as an argument:
  29. */
  30. typedef float (*gs_mapping_proc) (P2(floatp, const gx_transfer_map *));
  31. /*
  32. * Later, we recognized that this procedure should really be a general
  33. * closure:
  34. */
  35. typedef float (*gs_mapping_closure_proc_t) (P3(floatp value,
  36. const gx_transfer_map * pmap,
  37. const void *proc_data));
  38. typedef struct gs_mapping_closure_s {
  39. gs_mapping_closure_proc_t proc;
  40. const void *data;
  41. } gs_mapping_closure_t;
  42. #endif /* gxtmap_INCLUDED */