home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2 / Openstep-4.2-Intel-User.iso / usr / lib / NextStep / nlpPrintPackage.ps < prev    next >
Text File  |  1993-01-15  |  2KB  |  45 lines

  1. %!
  2. % Printing Package for Next Printers
  3. % Version: 3.0
  4. % Copyright: 1988, NeXT, Inc.
  5.  
  6. /__NXdef{1 index where{pop pop pop}{def}ifelse}bind def
  7. /__NXbdef{1 index where{pop pop pop}{bind def}ifelse}bind def
  8. /_NXLevel2 systemdict /languagelevel known {languagelevel 2 ge}{false}ifelse __NXdef
  9. /_NXCombineArrays{
  10.     counttomark dup 2 add index dup length 3 -1 roll {
  11.         2 index length sub dup 4 1 roll 1 index exch 4 -1 roll putinterval exch
  12.     }repeat pop pop pop
  13. }__NXbdef
  14. /flushgraphics{}def
  15. /setwindowtype{pop pop}def
  16. /currentwindowtype{pop 0}def
  17. /setalpha{pop}def
  18. /currentalpha{1.0}def
  19. /hidecursor{}def
  20. /obscurecursor{}def
  21. /revealcursor{}def
  22. /setcursor{4 {pop}repeat}bind def
  23. /showcursor{}def
  24. /_NXImageString {/__NXImageString where{pop}{/__NXImageString 4000 string __NXdef}ifelse __NXImageString}__NXbdef
  25. /_NXDoImageOp{
  26.     3 dict begin /parr 5 array def 1 index{dup}{1}ifelse /chans exch def
  27.     chans 2 add 2 roll parr 0 chans getinterval astore pop
  28.     5 index 4 index mul 2 index{1 sub 8 idiv 1 add mul}{mul 1 sub 8 idiv 1 add}ifelse
  29.     4 index mul /totbytes exch def pop exch pop
  30.     gsave matrix invertmatrix concat 0.5 setgray 0 0 4 2 roll rectfill grestore
  31.     {0 1 chans 1 sub{parr exch get exec length totbytes exch sub /totbytes exch def}for totbytes 0 le{exit}if}loop end
  32. }__NXbdef
  33. /alphaimage{1 add _NXDoImageOp}def
  34. /_NXCalibratedImage{exch{array astore dup length true}{false}ifelse
  35.     8 -1 roll{NXCalibratedRGBColorSpace setcolorspace}if
  36.     8 dict dup 9 1 roll begin /ImageType 1 def /MultipleDataSources exch def
  37.     currentcolorspace 0 get /Indexed eq{pop /Decode[0 2 6 index exp 1 sub]def}
  38.     {2 mul dup array /Decode exch def 1 sub 0 1 3 -1 roll{Decode exch dup 2 mod put}for}ifelse
  39.     /DataSource exch def /ImageMatrix exch def 
  40.     /BitsPerComponent exch def /Height exch def /Width exch def end image}__NXbdef
  41. /_NXSetCMYKOrRGB where{pop}{
  42.     mark{systemdict /currentwindow get exec}stopped
  43.     {{pop pop pop setcmykcolor}}{{nxsetrgbcolor pop pop pop pop}}ifelse /_NXSetCMYKOrRGB exch def cleartomark
  44. }ifelse
  45.