%!PS-Adobe-2.0 EPSF-2.0 %%Title: Ball.gif - by Jussi Hynninen %%Creator: XV Version 3.10a Rev: 12/29/94 - by John Bradley %%BoundingBox: 295 418 301 424 %%Pages: 1 %%DocumentFonts: %%EndComments %%EndProlog %%Page: 1 1 % remember original state /origstate save def % build a temporary dictionary 20 dict begin % define string to hold a scanline's worth of data /pix 45 string def % define space for color conversions /grays 15 string def % space for gray scale line /npixls 0 def /rgbindx 0 def % lower left corner 295 418 translate % size of image (on paper, in 1/72inch coords) 5.97600 5.61600 scale % define 'colorimage' if it isn't defined % ('colortogray' and 'mergeprocs' come from xwd2ps % via xgrab) /colorimage where % do we know about 'colorimage'? { pop } % yes: pop off the 'dict' returned { % no: define one /colortogray { % define an RGB->I function /rgbdata exch store % call input 'rgbdata' rgbdata length 3 idiv /npixls exch store /rgbindx 0 store 0 1 npixls 1 sub { grays exch rgbdata rgbindx get 20 mul % Red rgbdata rgbindx 1 add get 32 mul % Green rgbdata rgbindx 2 add get 12 mul % Blue add add 64 idiv % I = .5G + .31R + .18B put /rgbindx rgbindx 3 add store } for grays 0 npixls getinterval } bind def % Utility procedure for colorimage operator. % This procedure takes two procedures off the % stack and merges them into a single procedure. /mergeprocs { % def dup length 3 -1 roll dup length dup 5 1 roll 3 -1 roll add array cvx dup 3 -1 roll 0 exch putinterval dup 4 2 roll putinterval } bind def /colorimage { % def pop pop % remove 'false 3' operands {colortogray} mergeprocs image } bind def } ifelse % end of 'false' case 15 14 8 % dimensions of data [15 0 0 -14 0 14] % mapping matrix {currentfile pix readhexstring pop} false 3 colorimage ffffffffffffffffffffffff3daaaa3daaaa3daaaa3daaaa3daaaaffffffffffffffffff ffffffffffffffffff ffffffffffff3daaaa3daaaa3daaaa3daaaa3daaaa3daaaa3daaaa3daaaa337777ffffff ffffffffffffffffff ffffff3daaaa3daaaaa3cccbffffffffffffa3cccba3cccb3daaaa3daaaa337777337777 888888ffffffffffff ffffff3daaaaa3cccbffffffffffffa3cccb3daaaa3daaaa3daaaa3daaaa3daaaa337777 888888888888ffffff 3daaaa3daaaaffffffffffffa3cccb3daaaa3daaaa3daaaa3daaaa3daaaa3daaaa337777 000000888888ffffff 3daaaa3daaaaffffffa3cccb3daaaa3daaaa3daaaa3daaaa3daaaa3daaaa3daaaa337777 000000888888888888 3daaaa3daaaaa3cccb3daaaa3daaaa3daaaa3daaaa3daaaa3daaaa3daaaa337777337777 000000888888888888 3daaaa3daaaaa3cccb3daaaa3daaaa3daaaa3daaaa3daaaa3daaaa3daaaa337777337777 000000888888888888 3daaaa3daaaa3daaaa3daaaa3daaaa3daaaa3daaaa3daaaa3daaaa337777337777000000 000000888888888888 ffffff3daaaa3daaaa3daaaa3daaaa3daaaa3daaaa3daaaa337777337777337777000000 888888888888888888 ffffff3377773377773daaaa3daaaa3daaaa337777337777337777337777000000000000 888888888888ffffff ffffffffffff337777337777337777337777337777337777000000000000000000888888 888888888888ffffff ffffffffffffffffffffffff000000000000000000000000000000888888888888888888 888888ffffffffffff ffffffffffffffffffffffffffffffffffff888888888888888888888888888888ffffff ffffffffffffffffff showpage % stop using temporary dictionary end % restore original state origstate restore %%Trailer