home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 3.3J / os33j.iso / usr / lib / NextStep / printPackage.ps < prev    next >
Encoding:
Text File  |  1993-07-22  |  16.2 KB  |  390 lines

  1. %!
  2. % NeXT Printing Package
  3. % Version: 3.1J
  4. % Modified by Canon based on Version 3.0 : July 6,1992
  5. % Copyright: 1988, NeXT, Inc.
  6.  
  7. /__NXdef{1 index where{pop pop pop}{def}ifelse}bind def
  8. /__NXbdef{1 index where{pop pop pop}{bind def}ifelse}bind def
  9. /UserObjects 10 array __NXdef
  10. /defineuserobject{
  11.     exch dup 1 add dup UserObjects length gt{
  12.         array dup 0 UserObjects putinterval
  13.         /UserObjects exch def
  14.     }{pop}ifelse UserObjects exch 3 -1 roll put
  15. }__NXbdef
  16. /undefineuserobject{UserObjects exch null put}__NXbdef
  17. /execuserobject{UserObjects exch get exec}__NXbdef
  18. /__NXRectPath{4 2 roll moveto 1 index 0 rlineto
  19. 0 exch rlineto neg 0 rlineto closepath}__NXbdef
  20. /__NXProcessRectArgs{
  21.     1 index type /arraytype eq{
  22.         exch 0 4 2 index length 1 sub{
  23.             dup 3 add 1 exch{1 index exch get exch}for
  24.             5 1 roll 5 index exec
  25.         }for pop pop
  26.     }{exec}ifelse
  27. }__NXbdef
  28. /rectfill{gsave newpath {__NXRectPath fill} __NXProcessRectArgs grestore}__NXbdef
  29. /rectclip{newpath {__NXRectPath} __NXProcessRectArgs clip newpath}__NXbdef
  30. /rectstroke{
  31.     gsave newpath dup type /arraytype eq{dup length 6 eq}{false}ifelse{
  32.         {gsave __NXRectPath null concat stroke grestore}
  33.         dup length array cvx copy dup 2 4 -1 roll put __NXProcessRectArgs
  34.     }{{__NXRectPath stroke} __NXProcessRectArgs}ifelse grestore
  35. }__NXbdef
  36. /_NXLevel2 systemdict /languagelevel known {languagelevel 2 ge}{false}ifelse __NXdef
  37. systemdict /cshow known {
  38. /xyshow {
  39.     {
  40.     pop pop currentpoint 3 index 1 get add exch 3 index 0 get add exch
  41.     4 -1 roll dup length 2 sub 2 exch getinterval 4 1 roll
  42.     ( ) dup 0 6 -1 roll put show moveto
  43.     } 3 -1 roll cshow
  44.     pop
  45. }__NXbdef
  46. /xshow {
  47.     {
  48.     pop pop currentpoint exch 3 index 0 get add exch
  49.     4 -1 roll dup length 1 sub 1 exch getinterval 4 1 roll
  50.     ( ) dup 0 6 -1 roll put show moveto
  51.     } 3 -1 roll cshow
  52.     pop
  53. }__NXbdef
  54. /yshow{
  55.     {
  56.     pop pop currentpoint 3 index 0 get add
  57.     4 -1 roll dup length 1 sub 1 exch getinterval 4 1 roll
  58.     ( ) dup 0 6 -1 roll put show moveto
  59.     } 3 -1 roll cshow
  60.     pop
  61. }__NXbdef
  62. }{
  63. /xyshow{
  64.     0 1 3 index length 1 sub{
  65.         currentpoint 4 index 3 index 1 getinterval show
  66.         3 index 3 index 2 mul 1 add get add exch
  67.         3 index    3 index 2 mul get add exch moveto pop
  68.     }for pop pop
  69. }__NXbdef
  70. /xshow{
  71.     0 1 3 index length 1 sub{
  72.         currentpoint 4 index 3 index 1 getinterval show
  73.         exch 3 index 3 index get add exch moveto pop
  74.     }for pop pop
  75. }__NXbdef
  76. /yshow{
  77.     0 1 3 index length 1 sub{
  78.         currentpoint 4 index 3 index 1 getinterval show
  79.         3 index 3 index get add moveto pop
  80.     }for pop pop
  81. }__NXbdef
  82. } ifelse
  83. /arct{arcto pop pop pop pop}__NXbdef
  84. /setbbox{pop pop pop pop}__NXbdef
  85. /ucache{}__NXbdef
  86. /ucachestatus{mark 0 0 0 0 0}__NXbdef
  87. /setucacheparams{cleartomark}__NXbdef
  88. /uappend{systemdict begin cvx exec end}__NXbdef
  89. /ueofill{gsave newpath uappend eofill grestore}__NXbdef
  90. /ufill{gsave newpath uappend fill grestore}__NXbdef
  91. /ustroke{
  92.     gsave newpath dup length 6 eq
  93.     {exch uappend concat}{uappend}ifelse
  94.     stroke grestore
  95. }__NXbdef
  96. /__NXustrokepathMatrix dup where {pop pop}{matrix def}ifelse
  97. /ustrokepath{
  98.     newpath dup length 6 eq{
  99.         exch uappend __NXustrokepathMatrix currentmatrix exch concat
  100.         strokepath setmatrix
  101.     }{uappend strokepath}ifelse
  102. } __NXbdef
  103. /upath{
  104.     [exch {/ucache cvx}if pathbbox /setbbox cvx
  105.      {/moveto cvx}{/lineto cvx}{/curveto cvx}{/closepath cvx}pathforall]cvx
  106. } __NXbdef
  107. /setstrokeadjust{pop}__NXbdef
  108. /currentstrokeadjust{false}__NXbdef
  109. /selectfont{exch findfont exch
  110. dup type /arraytype eq {makefont}{scalefont}ifelse setfont}__NXbdef
  111. /_NXCombineArrays{
  112.     counttomark dup 2 add index dup length 3 -1 roll {
  113.         2 index length sub dup 4 1 roll 1 index exch 4 -1 roll putinterval exch
  114.     }repeat pop pop pop
  115. }__NXbdef
  116. /flushgraphics{}def
  117. /setwindowtype{pop pop}def
  118. /currentwindowtype{pop 0}def
  119. /setalpha{pop}def
  120. /currentalpha{1.0}def
  121. /hidecursor{}def
  122. /obscurecursor{}def
  123. /revealcursor{}def
  124. /setcursor{4 {pop}repeat}bind def
  125. /showcursor{}def
  126.  
  127. /SharedFontDirectory FontDirectory __NXdef
  128. /_JPN /GothicBBB-Medium.Hankaku dup findfont /FontName get eq def
  129. /_@Private dup where {pop pop}{50 dict def}ifelse
  130. /__NJdef _JPN {{//_@Private 3 1 roll put}}{{pop pop}} ifelse bind def
  131. /__NJbdef _JPN {{//_@Private 2 index known {pop pop}{bind //_@Private 3 1 roll put}ifelse}}{{pop pop}} ifelse bind def
  132. /_str 128 string __NJdef
  133. /_find { % /FName _find FontOrFName bool
  134.     false 0 {dup 3 index known {3 -1 roll get exch pop true exit}{pop}ifelse} forall
  135. } bind dup 1
  136. [/SharedFontDirectory dup where {exch get}{pop}ifelse //FontDirectory] put //_@Private 3 1 roll put
  137. /_copyfont@ { % -font- extension _copyfont@ -dict-
  138.     1 index maxlength add dict begin {
  139.     1 index /FID ne 2 index /UniqueID ne and {def}{pop pop}ifelse
  140.     } forall currentdict end
  141. } __NJbdef
  142. /_bind { % /n1 /n2 _bind /n1+2
  143.     exch dup length 2 index length add _str 4 2 roll
  144.     _str cvs length exch dup length string cvs putinterval
  145.     _str exch 0 exch getinterval cvn
  146. } __NJbdef
  147. /NDEncoding 256 array dup 0 1 255 {/.notdef put dup} for pop __NJdef
  148. /_shiftE { % /Fname start length target -font- _shiftE -dict-
  149.     0 _copyfont@ begin Encoding 4 2 roll getinterval NDEncoding 256 array
  150.     copy dup 4 -2 roll putinterval Encoding length 256 eq {
  151.     dup dup 0 128 getinterval 128 exch putinterval } if
  152.     /Encoding exch def /FontName exch def currentdict end
  153. } __NJbdef
  154. /_makeSGFDV { % - _makeSGFDV [FDV]
  155.     [ _FN /.WP-Symbol _bind dup findfont dup /FontName get 3 -1 roll ne {
  156.       pop /_FN /GothicBBB-Medium __NJdef /GothicBBB-Medium.WP-Symbol findfont
  157.     } if
  158.     _SGFN /.rFC _bind dup 0 96 32 5 index _shiftE definefont
  159.     _SGFN /.rFD _bind dup 96 32 32 6 index _shiftE definefont
  160.     _SGFN /.rFE _bind dup 0 128 0 _FN /-Ext-H _bind findfont dup /Encoding get
  161.     16#2d get exch /FDepVector get exch get _shiftE dup /Encoding 2 copy get
  162.     [16#f0 16#f1 16#f2 16#f5 16#f6 16#f7 16#fa 16#fb 16#fc] {
  163.     dup 2 index exch /.notdef put 128 sub 1 index exch /.notdef put
  164.     } forall put definefont
  165.     ] dup 0 /NotDefFont findfont put
  166. } __NJbdef
  167. /_defSGaiji { % /fullname /basename _defSGaiji -sysGaiji-
  168.     /_FN exch __NJdef /_SGFN exch __NJdef 15 dict
  169.     dup /FontName _SGFN put    dup /FontType 0 put
  170.     dup /FMapType 2 put        dup /FontMatrix matrix put
  171.     dup /FontBBox {0 -140 1000 880} put
  172.     dup /Encoding 256 array 0 1 255 {1 index exch 0 put}for
  173.     dup 16#FC 1 put    dup 16#FD 2 put    dup 16#FE 3 put put
  174.     dup /FDepVector _makeSGFDV put    dup /isNeXTGaiji true put
  175.     _SGFN exch definefont
  176. } __NJbdef
  177. /_defNeXTF { % /fullname /basename Hflag _defNeXTF
  178.     /_FN 2 index __NJdef /_HF exch __NJdef _HF {/-EUC-H}{/-EUC-V}ifelse
  179.     _bind dup findfont dup /FontName get 3 -1 roll ne {
  180.       pop _HF {/GothicBBB-Medium-EUC-H}{/GothicBBB-Medium-EUC-V}ifelse findfont
  181.     } if
  182.     1 _copyfont@ begin
  183.     /FontName 1 index def
  184.     /UserGaijiName _FN /-NeXT-UserGaiji _bind def
  185.     /Encoding Encoding dup length array copy FMapType 2 eq {dup 16#8E 78 put
  186.     0 1 9 {dup 16#F5 add exch 79 add 2 index 3 1 roll put} for
  187.     }{  dup 16#11D 78 put
  188.     0 1 9 {dup dup add 16#1EB add exch 79 add 2 index 3 1 roll put} for
  189.     } ifelse def
  190.     /FDepVector [FDepVector aload pop _FN /.Hankaku _bind
  191.     dup /_ _bind exch 128 128 0 3 index findfont _shiftE definefont
  192.     UserGaijiName findfont dup /isNeXTGaiji 2 copy known {
  193.         get {/FDepVector get 1 7 getinterval aload pop
  194.         }{pop /NotDefFont findfont 6 {dup} repeat}ifelse
  195.     }{pop pop pop /NotDefFont findfont 6 {dup} repeat}ifelse
  196.     _FN /-NeXT-SystemGaiji _bind findfont /FDepVector get 1 3 getinterval
  197.     aload pop] def
  198.     currentdict end definefont
  199. } __NJbdef
  200. /_findNarrow { % /FName _findNarrow -font-
  201.     dup _str cvs (Narrow) anchorsearch {pop cvn exch _find {exch pop}{
  202.     exch findfont 0 _copyfont@ dup /FontName 3 index put
  203.     dup /FontMatrix 2 copy get [5 6 div 0 0 1 0 0] matrix concatmatrix put
  204.     definefont}ifelse
  205.     }{pop findfont}ifelse
  206. } __NJbdef
  207. /_defNXR { % /NXname /rname _defNXR -font-
  208.     findfont 0 _copyfont@
  209.     dup /FontName 3 index put
  210.     dup /Encoding NextStepEncoding put definefont
  211. } bind def
  212. /_defmixfont@ { % /FName [/ASCII /KANJI shiftmtx] _defmixfont@ -font-
  213.     aload pop /_@shiftmatrix exch __NJdef (-NeXT-H) _bind findfont
  214.     /_EUC exch __NJdef _findNarrow /_@ASCII exch __NJdef
  215.     dup /_ exch _bind dup _EUC /Encoding get length 2 idiv dup 0 _EUC _shiftE
  216.     dup /Encoding 2 copy get dup
  217.     3 index /FMapType get 5 eq {16#41}{16#20}ifelse 89 put  put
  218.     dup /FontMatrix _@shiftmatrix put
  219.     dup /FDepVector [ _EUC /FDepVector get aload pop _EUC /FMapType get 5 eq {
  220.     /_S_ _@ASCII /FontName get _bind _@ASCII 0 _copyfont@
  221.     dup /Encoding 2 copy get 256 array copy dup dup dup 0 128 getinterval
  222.     128 exch putinterval 0 _@ASCII /Encoding get 128 128 getinterval
  223.     putinterval put dup /FontName 3 index put definefont
  224.     }{_@ASCII}ifelse
  225.      _@shiftmatrix matrix invertmatrix makefont] put definefont
  226.     15 dict begin
  227.     /FontName 2 index def
  228.     /FontType 0 def     /PaintType 0 def
  229.     /FMapType 4 def     /FontMatrix matrix def
  230.     /Encoding [0 1] def /PrefEnc 1 index /Encoding get def
  231.     /FontBBox _@ASCII /FontBBox get 4 array copy cvx
  232.         dup 2 get 1000 lt {dup 2 1000 put}if
  233.         dup 3 get 880 lt {dup 3 880 put}if def
  234.     /FontInfo _@ASCII /FontInfo get def
  235.     /FDepVector [_@ASCII 4 -1 roll] def
  236.     currentdict end definefont
  237. } __NJbdef
  238. /FixedRyuminCourier-Light {
  239.     [/NarrowCourier /Ryumin-Light matrix] _defmixfont@} __NJbdef
  240. /FixedRyuminCourier-LightOblique {
  241.     [/NarrowCourier-Oblique /Ryumin-Light [1 0 .212557 1 0 0]] _defmixfont@} __NJbdef
  242. /FixedRyuminCourier-Bold {
  243.     [/NarrowCourier-Bold /Ryumin-Light matrix] _defmixfont@} __NJbdef
  244. /FixedRyuminCourier-BoldOblique {
  245.     [/NarrowCourier-BoldOblique /Ryumin-Light [1 0 .212557 1 0 0]] _defmixfont@} __NJbdef
  246. /RyuminTimes-Light {
  247.     [/Times-Roman /Ryumin-Light matrix] _defmixfont@} __NJbdef
  248. /RyuminTimes-LightOblique {
  249.     [/Times-Italic /Ryumin-Light [1 0 .277325 1 0 0]] _defmixfont@} __NJbdef
  250. /RyuminTimes-Bold {
  251.     [/Times-Bold /Ryumin-Light matrix] _defmixfont@} __NJbdef
  252. /RyuminTimes-BoldOblique {
  253.     [/Times-BoldItalic /Ryumin-Light [1 0 .277325 1 0 0]] _defmixfont@} __NJbdef
  254. /FixedGothicBBBCourier {
  255.     [/NarrowCourier /GothicBBB-Medium matrix] _defmixfont@} __NJbdef
  256. /FixedGothicBBBCourier-Oblique {
  257.     [/NarrowCourier-Oblique /GothicBBB-Medium [1 0 .212557 1 0 0]] _defmixfont@} __NJbdef
  258. /FixedGothicBBBCourier-Bold {
  259.     [/NarrowCourier-Bold /GothicBBB-Medium matrix] _defmixfont@} __NJbdef
  260. /FixedGothicBBBCourier-BoldOblique {
  261.     [/NarrowCourier-BoldOblique /GothicBBB-Medium [1 0 .212557 1 0 0]] _defmixfont@} __NJbdef
  262. /GothicBBBHelvetica {
  263.     [/Helvetica /GothicBBB-Medium matrix] _defmixfont@} __NJbdef
  264. /GothicBBBHelvetica-Oblique {
  265.     [/Helvetica-Oblique /GothicBBB-Medium [1 0 .212557 1 0 0]] _defmixfont@} __NJbdef
  266. /GothicBBBHelvetica-Bold {
  267.     [/Helvetica-Bold /GothicBBB-Medium matrix] _defmixfont@} __NJbdef
  268. /GothicBBBHelvetica-BoldOblique {
  269.     [/Helvetica-BoldOblique /GothicBBB-Medium [1 0 .212557 1 0 0]] _defmixfont@} __NJbdef
  270. /TitleGothicBBBHelvetica {
  271.     [/Helvetica /GothicBBB-Medium matrix] _defmixfont@} __NJbdef
  272. /TitleGothicBBBHelvetica-Bold {
  273.     [/Helvetica-Bold /GothicBBB-Medium matrix] _defmixfont@} __NJbdef
  274.  
  275. /NextStepEncoding where not{
  276. /NextStepEncoding StandardEncoding 256 array copy def
  277. 0 [129/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/Ccedilla/Egrave
  278. /Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex/Idieresis
  279. /Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis/Ugrave/Uacute
  280. /Ucircumflex/Udieresis/Yacute/Thorn/mu/multiply/divide/copyright
  281. 176/registered 181/brokenbar 190/logicalnot 192/onesuperior 201/twosuperior
  282. 204/threesuperior 209/plusminus/onequarter/onehalf/threequarters/agrave
  283. /aacute/acircumflex/atilde/adieresis/aring/ccedilla/egrave/eacute
  284. /ecircumflex/edieresis/igrave 226/iacute 228/icircumflex/idieresis/eth
  285. /ntilde 236/ograve/oacute/ocircumflex/otilde/odieresis 242/ugrave/uacute
  286. /ucircumflex 246/udieresis/yacute 252/thorn/ydieresis]
  287. {dup type /nametype eq
  288.  {NextStepEncoding 2 index 2 index put pop 1 add}{exch pop}ifelse
  289. }forall pop
  290. /NextStepEncoding NextStepEncoding readonly def
  291. /_NXfstr 128 string dup 0 (_NX) putinterval def
  292. /_NXfindfont /findfont load def
  293. /findfont{
  294.  % Because we can never let NextStepEncoding get into
  295.  % SharedFontDirectory, we cannot reencode a font to NextStepEncoding
  296.  % if we are in shared mode.  So if currentshared is true,
  297.  % we call the normal findfont and return that
  298.  _JPN {//_@Private begin
  299.     dup _str cvs (-NeXT-) search {
  300.       cvn exch pop exch cvn dup /H eq {
  301.     pop exch _find {exch pop}{exch true _defNeXTF}ifelse false
  302.       }{
  303.     dup /V eq {
  304.       pop exch _find {exch pop}{exch false _defNeXTF}ifelse false
  305.     }{
  306.       /SystemGaiji eq {
  307.         exch _find {exch pop}{exch _defSGaiji}ifelse false
  308.       }{pop true} ifelse
  309.     } ifelse
  310.       } ifelse
  311.     }{
  312.       (NX@) anchorsearch {
  313.         pop exch _find {exch pop}{exch cvn _defNXR}ifelse false
  314.       }{pop true} ifelse
  315.     } ifelse
  316.     {
  317.       dup //_@Private exch known {dup load exec false}{true}ifelse
  318.     }{false}ifelse
  319.     end
  320.  }{true}ifelse {
  321.  /currentshared where {pop currentshared} {false} ifelse
  322.  {_NXfindfont}
  323.  {dup _NXfstr 3 125 getinterval cvs length 3 add _NXfstr 0 3 -1 roll
  324.   getinterval cvn exch FontDirectory 2 index known 
  325.   {pop FontDirectory exch get}
  326.   {_NXfindfont dup /Encoding get StandardEncoding eq
  327.    {    dup length dict exch
  328.     {1 index /FID ne {2 index 3 1 roll put}{pop pop}ifelse}forall
  329.      dup /Encoding NextStepEncoding put definefont
  330.     }{exch pop} ifelse
  331.    }ifelse
  332.  }ifelse
  333.  } if
  334. }bind def
  335. }{pop}ifelse
  336. /_NXImageString {/__NXImageString where{pop}{/__NXImageString 4000 string __NXdef}ifelse __NXImageString}__NXbdef
  337. /_NXDoImageOp{
  338.     3 dict begin /parr 5 array def 1 index{dup}{1}ifelse /chans exch def
  339.     chans 2 add 2 roll parr 0 chans getinterval astore pop
  340.     5 index 4 index mul 2 index{1 sub 8 idiv 1 add mul}{mul 1 sub 8 idiv 1 add}ifelse
  341.     4 index mul /totbytes exch def pop exch pop
  342.     gsave matrix invertmatrix concat 0.5 setgray 0 0 4 2 roll rectfill grestore
  343.     {0 1 chans 1 sub{parr exch get exec length totbytes exch sub /totbytes exch def}for totbytes 0 le{exit}if}loop end
  344. }__NXbdef
  345. /alphaimage{1 add _NXDoImageOp}def
  346. _NXLevel2{ 
  347.     /NXCalibratedRGBColorSpace where{pop}{
  348.         /NXCalibratedRGBColorSpace
  349.         {mark /NXCalibratedRGB /ColorSpace findresource exch pop}stopped
  350.         {cleartomark /NXCalibratedRGB[/CIEBasedABC 2 dict dup begin 
  351.         /MatrixLMN[.4124 .2126 .0193 .3576 .7152 .1192 .1805 .0722 .9505]def
  352.         /WhitePoint[.9505 1 1.089] def end] /ColorSpace defineresource}if def}ifelse
  353.     /nxsetrgbcolor{NXCalibratedRGBColorSpace setcolorspace setcolor}__NXbdef
  354.     /nxsetgray{dup dup nxsetrgbcolor}__NXbdef
  355.     /_NXCalibratedImage{exch{array astore dup length true}{false}ifelse
  356.         8 -1 roll{NXCalibratedRGBColorSpace setcolorspace}if
  357.         8 dict dup 9 1 roll begin /ImageType 1 def /MultipleDataSources exch def
  358.         currentcolorspace 0 get /Indexed eq{pop /Decode[0 2 6 index exp 1 sub]def}
  359.         {2 mul dup array /Decode exch def 1 sub 0 1 3 -1 roll{Decode exch dup 2 mod put}for}ifelse
  360.         /DataSource exch def /ImageMatrix exch def 
  361.         /BitsPerComponent exch def /Height exch def /Width exch def end image}__NXbdef
  362. } {
  363.     /setcmykcolor{
  364.         1.0 exch sub dup dup 6 -1 roll sub dup 0 lt{pop 0}if 5 1 roll
  365.         4 -1 roll sub dup 0 lt{pop 0}if 3 1 roll exch sub dup 0 lt{pop 0}if setrgbcolor}__NXbdef
  366.     /currentcmykcolor{currentrgbcolor 3{1.0 exch sub 3 1 roll}repeat 0}__NXbdef
  367.     /colorimage{2 copy 3 ne or{_NXDoImageOp}{4 index dup 8 ne exch 4 ne and{_NXDoImageOp}{
  368.         pop pop save 6 1 roll 12 dict begin/Proc exch def/Res 0 string def
  369.         /Alloc{2 index length mul 2 add dup 2 index load length gt{1.2 mul round cvi string def}{pop pop}ifelse}def
  370.         1 index 8 eq{/Unpack{.34 Alloc}def}{
  371.             /Wid 4 index 3 mul def exch pop 8 exch/Str1 0 string def/Lim Wid def
  372.             /Unpack{.67 Alloc/Str1 2 Alloc 0 exch Lim exch
  373.                 {dup -4 bitshift 17 mul Str1 exch 4 index exch put 15 and 17 mul Str1 exch 3 index 1 add exch put
  374.                 2 sub dup 0 le{0 lt Wid exch{exch 1 sub exch}if}if exch 2 add exch
  375.                 }forall/Lim exch def Str1 exch 0 exch getinterval
  376.             }def
  377.         }ifelse
  378.         /Ops[{.3 mul add 1}{.59 mul add 2}{.11 mul add round cvi Res exch 2 index exch put 1 add 0.0 0}]def/Val 0.0 def/Phase 0 def
  379.         {0 Val Phase Proc/Res Unpack{exch Ops exch get exec}forall/Phase exch def/Val exch def Res exch 0 exch getinterval}
  380.         image end restore}ifelse}ifelse
  381.     }__NXbdef
  382.     /nxsetrgbcolor{setrgbcolor}__NXbdef /nxsetgray{setgray}__NXbdef
  383.     /setpattern{pop .5 setgray}__NXbdef
  384.     /_NXCalibratedImage{dup 1 eq {pop pop image}{colorimage}ifelse pop}__NXbdef
  385. } ifelse
  386. /_NXSetCMYKOrRGB where{pop}{
  387.     mark{systemdict /currentwindow get exec}stopped
  388.     {{pop pop pop setcmykcolor}}{{nxsetrgbcolor pop pop pop pop}}ifelse /_NXSetCMYKOrRGB exch def cleartomark
  389. }ifelse
  390.