gscsepr.h 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. /* Copyright (C) 1992, 2000 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: gscsepr.h,v 1.4 2000/09/19 19:00:27 lpd Exp $ */
  16. /* Client interface to Separation color */
  17. #ifndef gscsepr_INCLUDED
  18. # define gscsepr_INCLUDED
  19. #include "gscspace.h"
  20. /* Graphics state */
  21. bool gs_currentoverprint(P1(const gs_state *));
  22. void gs_setoverprint(P2(gs_state *, bool));
  23. /* Overprint mode is a PDF feature, but we include it here. */
  24. int gs_currentoverprintmode(P1(const gs_state *));
  25. int gs_setoverprintmode(P2(gs_state *, int));
  26. /*
  27. * Separation color spaces.
  28. *
  29. * The API for creating Separation color space objects exposes the fact that
  30. * they normally cache the results of sampling the tint_transform procedure,
  31. * and use the cache to convert colors when necessary. When a language
  32. * interpreter sets up a Separation space, it may either provide a
  33. * tint_tranform procedure that will be called each time (specifying the
  34. * cache size as 0), or it may fill in the cache directly and provide a
  35. * dummy procedure.
  36. *
  37. * By default, the tint transformation procedure will simple return the
  38. * entries in the cache. If this function is called when the cache size is
  39. * 0, all color components in the alternative color space will be set to 0.
  40. */
  41. extern int gs_cspace_build_Separation(P5(
  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. /* Get the cached value array for a Separation color space. */
  49. /* VMS limits procedure names to 31 characters. */
  50. extern float *gs_cspace_get_sepr_value_array(P1(
  51. const gs_color_space * pcspace
  52. ));
  53. /* BACKWARD COMPATIBILITY */
  54. #define gs_cspace_get_separation_value_array gs_cspace_get_sepr_value_array
  55. /* Set the tint transformation procedure for a Separation color space. */
  56. /* VMS limits procedure names to 31 characters, and some systems only */
  57. /* compare the first 23 characters. */
  58. extern int gs_cspace_set_sepr_proc(P2(
  59. gs_color_space * pcspace,
  60. int (*proc)(P3(const gs_separation_params *,
  61. floatp,
  62. float *
  63. ))
  64. ));
  65. /* BACKWARD COMPATIBILITY */
  66. #define gs_cspace_set_tint_xform_proc gs_cspace_set_sepr_proc
  67. #define gs_cspace_set_tint_transform_proc gs_cspace_set_tint_xform_proc
  68. /* Set the Separation tint transformation procedure to a Function. */
  69. #ifndef gs_function_DEFINED
  70. typedef struct gs_function_s gs_function_t;
  71. # define gs_function_DEFINED
  72. #endif
  73. int gs_cspace_set_sepr_function(P2(const gs_color_space *pcspace,
  74. gs_function_t *pfn));
  75. /*
  76. * If the Separation tint transformation procedure is a Function,
  77. * return the function object, otherwise return 0.
  78. */
  79. gs_function_t *gs_cspace_get_sepr_function(P1(const gs_color_space *pcspace));
  80. #endif /* gscsepr_INCLUDED */