icolor.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /* Copyright (C) 1994, 1996, 1999 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: icolor.h,v 1.2 2000/09/19 19:00:42 lpd Exp $ */
  16. /* Declarations for transfer function & similar cache remapping */
  17. #ifndef icolor_INCLUDED
  18. # define icolor_INCLUDED
  19. /*
  20. * Define the number of stack slots needed for zcolor_remap_one.
  21. * The client is responsible for doing check_e/ostack or the equivalent
  22. * before calling zcolor_remap_one.
  23. */
  24. extern const int zcolor_remap_one_ostack;
  25. extern const int zcolor_remap_one_estack;
  26. /*
  27. * Schedule the sampling and reloading of a cache. Note that if
  28. * zcolor_remap_one recognize the procedure as being of a special form, it
  29. * may not schedule anything, but it still returns o_push_estack. (This is
  30. * a change as of release 5.95; formerly, it returned 0 in this case.)
  31. */
  32. int zcolor_remap_one(P5(i_ctx_t *, const ref *, gx_transfer_map *,
  33. const gs_state *, op_proc_t));
  34. /* Reload a cache with entries in [0..1] after sampling. */
  35. int zcolor_remap_one_finish(P1(i_ctx_t *));
  36. /* Reload a cache with entries in [-1..1] after sampling. */
  37. int zcolor_remap_one_signed_finish(P1(i_ctx_t *));
  38. /* Recompute the effective transfer functions and invalidate the current */
  39. /* color after cache reloading. */
  40. int zcolor_reset_transfer(P1(i_ctx_t *));
  41. /* Invalidate the current color after cache reloading. */
  42. int zcolor_remap_color(P1(i_ctx_t *));
  43. #endif /* icolor_INCLUDED */