home *** CD-ROM | disk | FTP | other *** search
/ jppd.dyndns.org / jppd.dyndns.org.tar / jppd.dyndns.org / QUERYPRO / Impressora_PDF / converter.exe / GPLGS / gs_ciecs3.ps < prev    next >
Text File  |  2002-08-23  |  3KB  |  124 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_ciecs3.ps,v 1.1 2002/08/22 07:12:28 henrys Exp $
  14. % Level 3 CIEBased color space method dictionaries.
  15. % This assumes gs_ciecs2.ps has already been processed.
  16.  
  17. %
  18. % The validation routines in these method dictionaries perform only
  19. % partial validations; the .setcie* operators will perform the rest.
  20. %
  21.  
  22.  
  23. .currentglobal true .setglobal
  24. .cspace_util begin
  25.  
  26.  
  27. /.setciedefspace where
  28.   {
  29.     pop
  30.     colorspacedict
  31.     /CIEBasedDEF
  32.       mark
  33.         /cs_potential_indexed_base true
  34.         /cs_potential_pattern_base true
  35.         /cs_potential_alternate true
  36.         /cs_potential_icc_alternate true
  37.         /cs_get_ncomps //ncomps_3
  38.  
  39.         /cs_get_range
  40.           {
  41.             1 get /RangeDEF .knownget not
  42.               { //dflt_range_3 }
  43.             if
  44.           }
  45.         bind
  46.  
  47.         /cs_get_default_color { pop 0 0 0 } bind
  48.         /cs_get_currentgray //no_currentgray
  49.         /cs_get_currentrgb //no_currentrgb
  50.         /cs_get_currentcmyk //no_currentcmyk
  51.         /cs_validate //check_cie_cspace
  52.         /cs_substitute //dup_1
  53.         /cs_prepare {}
  54.  
  55.         /cs_install
  56.           {
  57.             NOCIE
  58.               { pop /DeviceRGB //.cs_install exec }
  59.               { 1 get .setciedefspace }
  60.             ifelse
  61.           }
  62.         bind
  63.  
  64.         /cs_prepare_color //validate_3
  65.         /cs_complete_setcolor //pop_1
  66.       .dicttomark
  67.     put
  68.   }
  69. if
  70.  
  71.  
  72. /.setciedefgspace where
  73.   {
  74.     pop
  75.     colorspacedict
  76.     /CIEBasedDEFG
  77.       mark
  78.         /cs_potential_indexed_base true
  79.         /cs_potential_pattern_base true
  80.         /cs_potential_alternate true
  81.         /cs_potential_icc_alternate true
  82.         /cs_get_ncomps //ncomps_4
  83.  
  84.         /cs_get_range
  85.           {
  86.             1 get /RangeDEFG .knownget not
  87.               { //dflt_range_4 }
  88.             if
  89.           }
  90.         bind
  91.  
  92.         /cs_get_default_color { pop 0 0 0 0 } bind
  93.         /cs_get_currentgray //no_currentgray
  94.         /cs_get_currentrgb //no_currentrgb
  95.         /cs_get_currentcmyk //no_currentcmyk
  96.         /cs_validate //check_cie_cspace
  97.         /cs_substitute //dup_1
  98.         /cs_prepare {}
  99.  
  100.         % the use of the DeviceCMYK color space is questionable:
  101.         % it will likely have the wrong polarity
  102.         /cs_install
  103.           {
  104.             NOCIE
  105.               { pop /DeviceCMYK //.cs_install exec }
  106.               { 1 get .setciedefgspace }
  107.             ifelse
  108.           }
  109.         bind
  110.  
  111.         /cs_prepare_color //validate_4
  112.         /cs_complete_setcolor //pop_1
  113.       .dicttomark
  114.     put
  115.   }
  116. if
  117.  
  118.  
  119. end     % .cspace_util
  120. .setglobal
  121.