1 % Copyright (C) 2002 Aladdin Enterprises. All rights reserved.
3 % This software is provided AS-IS with no warranty, either express or
6 % This software is distributed under license and may not be copied,
7 % modified or distributed except as expressly authorized under the terms
8 % of the license contained in the file LICENSE in this distribution.
10 % For more information about licensing, please refer to
11 % http://www.ghostscript.com/licensing/. For information on
12 % commercial licensing, go to http://www.artifex.com/licensing/ or
13 % contact Artifex Software, Inc., 101 Lucas Valley Road #110,
14 % San Rafael, CA 94903, U.S.A., +1(415)492-9861.
16 % $Id: gs_ciecs2.ps,v 1.1 2002/08/22 07:12:28 henrys Exp $
17 % Level 2 CIEBased color space method dictionaries.
20 % The validation routines in these method dictionaries perform only
21 % partial validations; the .setcie* operators will perform the rest.
24 % verify that at least one of the CIEBased color spaces is supported
26 { /.setcieaspace /.setcieabcspace /.setciedefspace /.setciedefgspace }
33 { currentfile closefile }
37 .currentglobal true .setglobal
41 % <obj> check_cie_cspace <obj>
43 % Perform a very basic check that an object is a CIEBased color space
49 dup 1 get type /dicttype ne
63 /cs_potential_indexed_base true
64 /cs_potential_pattern_base true
65 /cs_potential_alternate true
66 /cs_potential_icc_alternate true
67 /cs_get_ncomps //ncomps_1
71 1 get /RangeA .knownget not
77 /cs_get_default_color { pop 0 } bind
78 /cs_get_currentgray //no_currentgray
79 /cs_get_currentrgb //no_currentrgb
80 /cs_get_currentcmyk //no_currentcmyk
81 /cs_validate //check_cie_cspace
82 /cs_substitute //dup_1
88 { pop /DeviceGray //.cs_install exec }
89 { 1 get .setcieaspace }
94 /cs_prepare_color //validate_1
95 /cs_complete_setcolor //pop_1
101 /.setcieabcspace where
107 /cs_potential_indexed_base true
108 /cs_potential_pattern_base true
109 /cs_potential_alternate true
110 /cs_potential_icc_alternate true
111 /cs_get_ncomps //ncomps_3
115 1 get /RangeABC .knownget not
121 /cs_get_default_color { pop 0 0 0 } bind
122 /cs_get_currentgray //no_currentgray
123 /cs_get_currentrgb //no_currentrgb
124 /cs_get_currentcmyk //no_currentcmyk
125 /cs_validate //check_cie_cspace
126 /cs_substitute //dup_1
132 { pop /DeviceRGB //.cs_install exec }
133 { 1 get .setcieabcspace }
138 /cs_prepare_color //validate_3
139 /cs_complete_setcolor //pop_1