home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 1996 February / PCWK0296.iso / sharewar / dos / program / gs300sr1 / gs300sr1.exe / GSSEPR.C < prev    next >
Text File  |  1994-07-27  |  2KB  |  52 lines

  1. /* Copyright (C) 1994 Aladdin Enterprises.  All rights reserved.
  2.   
  3.   This file is part of Aladdin Ghostscript.
  4.   
  5.   Aladdin Ghostscript is distributed with NO WARRANTY OF ANY KIND.  No author
  6.   or distributor accepts any responsibility for the consequences of using it,
  7.   or for whether it serves any particular purpose or works at all, unless he
  8.   or she says so in writing.  Refer to the Aladdin Ghostscript Free Public
  9.   License (the "License") for full details.
  10.   
  11.   Every copy of Aladdin Ghostscript must include a copy of the License,
  12.   normally in a plain ASCII text file named PUBLIC.  The License grants you
  13.   the right to copy, modify and redistribute Aladdin Ghostscript, but only
  14.   under certain conditions described in the License.  Among other things, the
  15.   License requires that the copyright notice and this notice be preserved on
  16.   all copies.
  17. */
  18.  
  19. /* gssepr.c */
  20. /* Separation color handling for Ghostscript */
  21.  
  22. typedef ulong gs_separation;            /* BOGUS */
  23. #define gs_no_separation ((gs_separation)(-1L))
  24.  
  25. #define dev_proc_lookup_separation(proc)\
  26.   gs_separation proc(P4(gx_device *dev, const byte *sname, uint len,\
  27.     gx_color_value *num_levels))
  28.  
  29. #define dev_proc_map_tint_color(proc)\
  30.   gx_color_index proc(P4(gx_device *dev, gs_separation sepr, bool overprint,\
  31.     gx_color_value tint))
  32.  
  33. /*
  34.  * In principle, setting a Separation color space, or setting the device
  35.  * when the current color space is a Separation space, calls the
  36.  * lookup_separation device procedure to obtain the separation ID and
  37.  * the number of achievable levels.  Currently, the only hooks for doing
  38.  * this are unsuitable: gx_set_cmap_procs isn't called when the color
  39.  * space changes, and doing it in gx_remap_Separation is inefficient.
  40.  * Probably the best approach is to call gx_set_cmap_procs whenever the
  41.  * color space changes.  In fact, if we do this, we can probably short-cut
  42.  * two levels of procedure call in color remapping (gx_remap_color, by
  43.  * turning it into a macro, and gx_remap_DeviceXXX, by calling the
  44.  * cmap_proc procedure directly).  Some care will be required for the
  45.  * implicit temporary resetting of the color space in [color]image.
  46.  *
  47.  * For actual remapping of Separation colors, we need cmap_separation_direct
  48.  * and cmap_separation_halftoned, just as for the other device color spaces.
  49.  * So we need to break apart gx_render_gray in gxdither.c so it can also
  50.  * do the job for separations.
  51.  */
  52.