home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OpenStep 4.2J
/
os42j.iso
/
usr
/
lib
/
NextStep
/
printPackage.ps
< prev
next >
Wrap
Text File
|
1993-03-17
|
8KB
|
189 lines
%!
% NeXT Printing Package
% Version: 3.1
% Copyright: 1988, NeXT, Inc.
/__NXdef{1 index where{pop pop pop}{def}ifelse}bind def
/__NXbdef{1 index where{pop pop pop}{bind def}ifelse}bind def
/UserObjects 10 array __NXdef
/defineuserobject{
exch dup 1 add dup UserObjects length gt{
array dup 0 UserObjects putinterval
/UserObjects exch def
}{pop}ifelse UserObjects exch 3 -1 roll put
}__NXbdef
/undefineuserobject{UserObjects exch null put}__NXbdef
/execuserobject{UserObjects exch get exec}__NXbdef
/__NXRectPath{4 2 roll moveto 1 index 0 rlineto
0 exch rlineto neg 0 rlineto closepath}__NXbdef
/__NXProcessRectArgs{
1 index type /arraytype eq{
exch 0 4 2 index length 1 sub{
dup 3 add 1 exch{1 index exch get exch}for
5 1 roll 5 index exec
}for pop pop
}{exec}ifelse
}__NXbdef
/rectfill{gsave newpath {__NXRectPath fill} __NXProcessRectArgs grestore}__NXbdef
/rectclip{newpath {__NXRectPath} __NXProcessRectArgs clip newpath}__NXbdef
/rectstroke{
gsave newpath dup type /arraytype eq{dup length 6 eq}{false}ifelse{
{gsave __NXRectPath null concat stroke grestore}
dup length array cvx copy dup 2 4 -1 roll put __NXProcessRectArgs
}{{__NXRectPath stroke} __NXProcessRectArgs}ifelse grestore
}__NXbdef
/_NXLevel2 systemdict /languagelevel known {languagelevel 2 ge}{false}ifelse __NXdef
/xyshow{
0 1 3 index length 1 sub{
currentpoint 4 index 3 index 1 getinterval show
3 index 3 index 2 mul 1 add get add exch
3 index 3 index 2 mul get add exch moveto pop
}for pop pop
}__NXbdef
/xshow{
0 1 3 index length 1 sub{
currentpoint 4 index 3 index 1 getinterval show
exch 3 index 3 index get add exch moveto pop
}for pop pop
}__NXbdef
/yshow{
0 1 3 index length 1 sub{
currentpoint 4 index 3 index 1 getinterval show
3 index 3 index get add moveto pop
}for pop pop
}__NXbdef
/arct{arcto pop pop pop pop}__NXbdef
/setbbox{pop pop pop pop}__NXbdef
/ucache{}__NXbdef
/ucachestatus{mark 0 0 0 0 0}__NXbdef
/setucacheparams{cleartomark}__NXbdef
/uappend{systemdict begin cvx exec end}__NXbdef
/ueofill{gsave newpath uappend eofill grestore}__NXbdef
/ufill{gsave newpath uappend fill grestore}__NXbdef
/ustroke{
gsave newpath dup length 6 eq
{exch uappend concat}{uappend}ifelse
stroke grestore
}__NXbdef
/__NXustrokepathMatrix dup where {pop pop}{matrix def}ifelse
/ustrokepath{
newpath dup length 6 eq{
exch uappend __NXustrokepathMatrix currentmatrix exch concat
strokepath setmatrix
}{uappend strokepath}ifelse
} __NXbdef
/upath{
[exch {/ucache cvx}if pathbbox /setbbox cvx
{/moveto cvx}{/lineto cvx}{/curveto cvx}{/closepath cvx}pathforall]cvx
} __NXbdef
/setstrokeadjust{pop}__NXbdef
/currentstrokeadjust{false}__NXbdef
/selectfont{exch findfont exch
dup type /arraytype eq {makefont}{scalefont}ifelse setfont}__NXbdef
/_NXCombineArrays{
counttomark dup 2 add index dup length 3 -1 roll {
2 index length sub dup 4 1 roll 1 index exch 4 -1 roll putinterval exch
}repeat pop pop pop
}__NXbdef
/flushgraphics{}def
/setwindowtype{pop pop}def
/currentwindowtype{pop 0}def
/setalpha{pop}def
/currentalpha{1.0}def
/hidecursor{}def
/obscurecursor{}def
/revealcursor{}def
/setcursor{4 {pop}repeat}bind def
/showcursor{}def
/NextStepEncoding where not{
/NextStepEncoding StandardEncoding 256 array copy def
0 [129/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/Ccedilla/Egrave
/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex/Idieresis
/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis/Ugrave/Uacute
/Ucircumflex/Udieresis/Yacute/Thorn/mu/multiply/divide/copyright
176/registered 181/brokenbar 190/logicalnot 192/onesuperior 201/twosuperior
204/threesuperior 209/plusminus/onequarter/onehalf/threequarters/agrave
/aacute/acircumflex/atilde/adieresis/aring/ccedilla/egrave/eacute
/ecircumflex/edieresis/igrave 226/iacute 228/icircumflex/idieresis/eth
/ntilde 236/ograve/oacute/ocircumflex/otilde/odieresis 242/ugrave/uacute
/ucircumflex 246/udieresis/yacute 252/thorn/ydieresis]
{dup type /nametype eq
{NextStepEncoding 2 index 2 index put pop 1 add}{exch pop}ifelse
}forall pop
/NextStepEncoding NextStepEncoding readonly def
/_NXfstr 128 string dup 0 (_NX) putinterval def
/_NXfindfont /findfont load def
/findfont{
% Because we can never let NextStepEncoding get into
% SharedFontDirectory, we cannot reencode a font to NextStepEncoding
% if we are in shared mode. So if currentshared is true,
% we call the normal findfont and return that
/currentshared where {pop currentshared} {false} ifelse
{_NXfindfont}
{dup _NXfstr 3 125 getinterval cvs length 3 add _NXfstr 0 3 -1 roll
getinterval cvn exch FontDirectory 2 index known
{pop FontDirectory exch get}
{_NXfindfont dup /Encoding get StandardEncoding eq
{ dup length dict exch
{1 index /FID ne {2 index 3 1 roll put}{pop pop}ifelse}forall
dup /Encoding NextStepEncoding put definefont
}{exch pop} ifelse
}ifelse
}ifelse
}bind def
}{pop}ifelse
/_NXImageString {/__NXImageString where{pop}{/__NXImageString 4000 string __NXdef}ifelse __NXImageString}__NXbdef
/_NXDoImageOp{
3 dict begin /parr 5 array def 1 index{dup}{1}ifelse /chans exch def
chans 2 add 2 roll parr 0 chans getinterval astore pop
5 index 4 index mul 2 index{1 sub 8 idiv 1 add mul}{mul 1 sub 8 idiv 1 add}ifelse
4 index mul /totbytes exch def pop exch pop
gsave matrix invertmatrix concat 0.5 setgray 0 0 4 2 roll rectfill grestore
{0 1 chans 1 sub{parr exch get exec length totbytes exch sub /totbytes exch def}for totbytes 0 le{exit}if}loop end
}__NXbdef
/alphaimage{1 add _NXDoImageOp}def
_NXLevel2{
/NXCalibratedRGBColorSpace where{pop}{
/NXCalibratedRGBColorSpace
{mark /NXCalibratedRGB /ColorSpace findresource exch pop}stopped
{cleartomark /NXCalibratedRGB[/CIEBasedABC 2 dict dup begin
/MatrixLMN[.4124 .2126 .0193 .3576 .7152 .1192 .1805 .0722 .9505]def
/WhitePoint[.9505 1 1.089] def end] /ColorSpace defineresource}if def}ifelse
/nxsetrgbcolor{NXCalibratedRGBColorSpace setcolorspace setcolor}__NXbdef
/nxsetgray{dup dup nxsetrgbcolor}__NXbdef
/_NXCalibratedImage{exch{array astore dup length true}{false}ifelse
8 -1 roll{NXCalibratedRGBColorSpace setcolorspace}if
8 dict dup 9 1 roll begin /ImageType 1 def /MultipleDataSources exch def
currentcolorspace 0 get /Indexed eq{pop /Decode[0 2 6 index exp 1 sub]def}
{2 mul dup array /Decode exch def 1 sub 0 1 3 -1 roll{Decode exch dup 2 mod put}for}ifelse
/DataSource exch def /ImageMatrix exch def
/BitsPerComponent exch def /Height exch def /Width exch def end image}__NXbdef
} {
/setcmykcolor{
1.0 exch sub dup dup 6 -1 roll sub dup 0 lt{pop 0}if 5 1 roll
4 -1 roll sub dup 0 lt{pop 0}if 3 1 roll exch sub dup 0 lt{pop 0}if setrgbcolor}__NXbdef
/currentcmykcolor{currentrgbcolor 3{1.0 exch sub 3 1 roll}repeat 0}__NXbdef
/colorimage{2 copy 3 ne or{_NXDoImageOp}{4 index dup 8 ne exch 4 ne and{_NXDoImageOp}{
pop pop save 6 1 roll 12 dict begin/Proc exch def/Res 0 string def
/Alloc{2 index length mul 2 add dup 2 index load length gt{1.2 mul round cvi string def}{pop pop}ifelse}def
1 index 8 eq{/Unpack{.34 Alloc}def}{
/Wid 4 index 3 mul def exch pop 8 exch/Str1 0 string def/Lim Wid def
/Unpack{.67 Alloc/Str1 2 Alloc 0 exch Lim exch
{dup -4 bitshift 17 mul Str1 exch 4 index exch put 15 and 17 mul Str1 exch 3 index 1 add exch put
2 sub dup 0 le{0 lt Wid exch{exch 1 sub exch}if}if exch 2 add exch
}forall/Lim exch def Str1 exch 0 exch getinterval
}def
}ifelse
/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
{0 Val Phase Proc/Res Unpack{exch Ops exch get exec}forall/Phase exch def/Val exch def Res exch 0 exch getinterval}
image end restore}ifelse}ifelse
}__NXbdef
/nxsetrgbcolor{setrgbcolor}__NXbdef /nxsetgray{setgray}__NXbdef
/setpattern{pop .5 setgray}__NXbdef
/_NXCalibratedImage{dup 1 eq {pop pop image}{colorimage}ifelse pop}__NXbdef
} ifelse
/_NXSetCMYKOrRGB where{pop}{
mark{systemdict /currentwindow get exec}stopped
{{pop pop pop setcmykcolor}}{{nxsetrgbcolor pop pop pop pop}}ifelse /_NXSetCMYKOrRGB exch def cleartomark
}ifelse