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_devpxl.ps,v 1.1 2002/08/22 07:12:28 henrys Exp $
17 % DevicePixel color space method dictionaries.
20 % This file implements the DevicePixel color space. See gs_cspace.ps
23 % The DevicePixel color space includes a single parameter, the bit
24 % depth of the device color representation. Color is expressed as
25 % single integers in an opaque, device-specific format.
28 % verify that the DevicePixel color space is supported
29 /.setdevicepixelspace where
31 { currentfile closefile }
35 .currentglobal true .setglobal
43 /cs_potential_indexed_base true
44 /cs_potential_pattern_base true
45 /cs_potential_alternate true
46 /cs_potential_icc_alternate true
47 /cs_get_ncomps //ncomps_1
48 /cs_get_range { [ exch 1 get 1 exch bitshift 1 sub ] } bind
49 /cs_get_default_color { pop 0 } bind % no good default
50 /cs_get_currentgray //no_currentgray
51 /cs_get_currentrgb //no_currentrgb
52 /cs_get_currentcmyk //no_currentcmyk
57 dup 1 get dup type /integertype ne
61 //setcspace_rangecheck
63 31 gt % 31 bits is an implementation limit
64 { /setcolorspace cvx /limitcheck signalerror }
69 /cs_substitute //dup_1
71 /cs_install { .setdevicepixelspace } bind
72 /cs_prepare_color //validate_1
73 /cs_complete_setcolor //pop_1