diff options
Diffstat (limited to 'Master/tlpkg/tlgs/lib/docie.ps')
-rw-r--r-- | Master/tlpkg/tlgs/lib/docie.ps | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/Master/tlpkg/tlgs/lib/docie.ps b/Master/tlpkg/tlgs/lib/docie.ps index b74cd151ac2..1b5dc7d5875 100644 --- a/Master/tlpkg/tlgs/lib/docie.ps +++ b/Master/tlpkg/tlgs/lib/docie.ps @@ -1,19 +1,19 @@ % Copyright (C) 1995 Aladdin Enterprises. All rights reserved. -% +% % This software is provided AS-IS with no warranty, either express or % implied. -% +% % This software is distributed under license and may not be copied, % modified or distributed except as expressly authorized under the terms % of the license contained in the file LICENSE in this distribution. -% +% % For more information about licensing, please refer to % http://www.ghostscript.com/licensing/. For information on % commercial licensing, go to http://www.artifex.com/licensing/ or % contact Artifex Software, Inc., 101 Lucas Valley Road #110, % San Rafael, CA 94903, U.S.A., +1(415)492-9861. -% $Id: docie.ps 8411 2007-11-28 18:39:59Z ray $ +% $Id$ % docie.ps % Emulate CIE algorithms in PostScript. @@ -49,19 +49,19 @@ } bind def /mmult3 % <u> <v> <w> [<uu> <uv> ... <wv> <ww>] mmult3 - % <u'> <v'> <w'> + % <u'> <v'> <w'> { 4 -1 roll dup dup 6 -1 roll dup dup 8 -1 roll dup dup 10 -1 roll { 10 -1 roll mul } forall - % Stack: u1 v1 w1 u2 v2 w2 u3 v3 w3 + % Stack: u1 v1 w1 u2 v2 w2 u3 v3 w3 4 -1 roll add 6 -1 roll add - % Stack: u1 v1 u2 v2 u3 v3 w' + % Stack: u1 v1 u2 v2 u3 v3 w' 7 1 roll 3 -1 roll add 4 -1 roll add - % Stack: w' u1 u2 u3 v' + % Stack: w' u1 u2 u3 v' 5 1 roll add add 3 1 roll } bind def /minvert3 % [<uu> <uv> ... <wv> <ww>] minvert3 - % [<uu'> <uv'> ... <wv'> <ww'>] + % [<uu'> <uv'> ... <wv'> <ww'>] { 16 dict begin aload pop { I H G F E D C B A } { exch def } forall /coa E I mul F H mul sub def @@ -126,20 +126,20 @@ DOCIEDEBUG { (After MatrixABC Decode: ) print3 } if % ---------------- Rendering from XYZ ---------------- % /lookup3 % <rtable> <a[0..1]> <b[0..1]> <c[0..1]> lookup3 - % <rtable> <bytes> + % <rtable> <bytes> { 3 -1 roll 3 index 0 get 1 sub mul 3 -1 roll 3 index 1 get 1 sub mul 3 -1 roll 3 index 2 get 1 sub mul - % Stack: rtable ia ib ic + % Stack: rtable ia ib ic DOCIEDEBUG { (RenderTable indices: ) print3 mark 5 1 roll } if 3 -1 roll round cvi 3 index 3 get exch get - % Stack: rtable ib ic string + % Stack: rtable ib ic string 3 -1 roll round cvi 3 index 2 get mul - % Stack: rtable ic string ib*nc + % Stack: rtable ic string ib*nc 3 -1 roll round cvi add 2 index 4 get mul - % Stack: rtable string index + % Stack: rtable string index 2 index 4 get getinterval - % Stack: rtable bytes + % Stack: rtable bytes DOCIEDEBUG { (RenderTable values: ) print (<) print (%stdout) (w) file 1 index writehexstring (>) = } if } bind def @@ -156,11 +156,11 @@ DOCIEDEBUG { (After MatrixPQR: ) print3 } if 6 index /BlackPoint .knownget not { bpdefault } if 4 { 4 -1 roll aload pop - % Stack: csdict crdict x y z pt pt pt px py pz + % Stack: csdict crdict x y z pt pt pt px py pz 3 copy 12 index /MatrixPQR .knownget { mmult3 } if 6 array astore } repeat - % Stack: csdict crdict x y z wps+ bps+ wpd+ bpd+ + % Stack: csdict crdict x y z wps+ bps+ wpd+ bpd+ 9 -1 roll pop % get rid of csdict 7 4 roll 7 index /TransformPQR get @@ -188,14 +188,14 @@ DOCIEDEBUG { (After EncodeABC Encode: ) print3 } if { % Stack: u v w ranges rtable 5 1 roll rescale3 DOCIEDEBUG { (Rescaled ABC: ) print3 } if - % Stack: rtable a b c + % Stack: rtable a b c lookup3 - % Stack: rtable bytes + % Stack: rtable bytes 0 1 3 index 4 get 1 sub { % Stack: values rtable bytes c - 2 copy get 255 div - % Stack: values rtable bytes c v - 3 index 3 -1 roll 5 add get exec 3 1 roll + 2 copy get 255 div + % Stack: values rtable bytes c v + 3 index 3 -1 roll 5 add get exec 3 1 roll } for pop pop DOCIEDEBUG { (After RenderTableT: ) print ] dup == aload pop } if @@ -215,6 +215,6 @@ DOCIEDEBUG { (After RangeABC Encode: ) print3 } if /DeviceRGB { pop /DefaultRGB /ColorSpace findresource 1 get 4 1 roll cscieabc currentcolorrendering 4 1 roll crmap } bind .dicttomark def /mapcie % <a> mapcie <v1> ... - % <a> <b> <c> mapcie <v1> ... + % <a> <b> <c> mapcie <v1> ... { currentcolorspace dup 0 get //mapdict exch get exec } bind def |