home *** CD-ROM | disk | FTP | other *** search
/ jppd.dyndns.org / jppd.dyndns.org.tar / jppd.dyndns.org / QUERYPRO / Impressora_PDF / converter.exe / GPLGS / gs_devpxl.ps < prev    next >
Text File  |  2002-08-23  |  2KB  |  79 lines

  1. %    Copyright (C) 2002 Aladdin Enterprises.  All rights reserved.
  2. % This software is provided AS-IS with no warranty, either express or
  3. % implied.
  4. % This software is distributed under license and may not be copied,
  5. % modified or distributed except as expressly authorized under the terms
  6. % of the license contained in the file LICENSE in this distribution.
  7. % For more information about licensing, please refer to
  8. % http://www.ghostscript.com/licensing/. For information on
  9. % commercial licensing, go to http://www.artifex.com/licensing/ or
  10. % contact Artifex Software, Inc., 101 Lucas Valley Road #110,
  11. % San Rafael, CA  94903, U.S.A., +1(415)492-9861.
  12.  
  13. % $Id: gs_devpxl.ps,v 1.1 2002/08/22 07:12:28 henrys Exp $
  14. % DevicePixel color space method dictionaries.
  15.  
  16. %
  17. % This file implements the DevicePixel color space. See gs_cspace.ps
  18. % for information.
  19. %
  20. % The DevicePixel color space includes a single parameter, the bit
  21. % depth of the device color representation. Color is expressed as
  22. % single integers in an opaque, device-specific format.
  23. %
  24.  
  25. % verify that the DevicePixel color space is supported
  26. /.setdevicepixelspace where
  27.   { pop }
  28.   { currentfile closefile }
  29. ifelse
  30.  
  31.  
  32. .currentglobal true .setglobal
  33.  
  34. .cspace_util begin
  35.  
  36.  
  37. colorspacedict
  38. /DevicePixel
  39.   mark
  40.     /cs_potential_indexed_base true
  41.     /cs_potential_pattern_base true
  42.     /cs_potential_alternate true
  43.     /cs_potential_icc_alternate true
  44.     /cs_get_ncomps //ncomps_1
  45.     /cs_get_range { [ exch 1 get 1 exch bitshift 1 sub ] } bind
  46.     /cs_get_default_color { pop 0 } bind    % no good default
  47.     /cs_get_currentgray //no_currentgray
  48.     /cs_get_currentrgb //no_currentrgb
  49.     /cs_get_currentcmyk //no_currentcmyk
  50.  
  51.     /cs_validate
  52.       {
  53.         //check_array exec
  54.         dup 1 get dup type /integertype ne
  55.           //setcspace_typecheck
  56.         if
  57.         dup 0 lt
  58.           //setcspace_rangecheck
  59.         if
  60.         31 gt   % 31 bits is an implementation limit
  61.           { /setcolorspace cvx /limitcheck signalerror }
  62.         if
  63.       }
  64.     bind
  65.  
  66.     /cs_substitute //dup_1
  67.     /cs_prepare {}
  68.     /cs_install { .setdevicepixelspace } bind
  69.     /cs_prepare_color //validate_1
  70.     /cs_complete_setcolor //pop_1
  71.   .dicttomark
  72. put
  73.  
  74. end     % .cspace_util
  75. .setglobal
  76.