home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magazyn Amiga Shareware Floppies
/
ma18.dms
/
ma18.adf
/
PGSprinters
/
PostScript.Prolog
< prev
next >
Wrap
Text File
|
1994-01-20
|
17KB
|
844 lines
%%BeginProlog
% $VER: 2.2.11 06/15/92
%Copyright 1991-1992 Soft-Logik Publishing Corp.
/AsphaltDict dup 153 dict def load begin
%
% some definitions & variables
%
/bdef {bind def} bind def
/xdef {exch def} bdef
/ldef {load def} bdef
/SG /setgray ldef
/dmatrix matrix def
/cmatrix matrix def
/omatrix matrix def
/deltax 0 def
/deltay 0 def
/slant 0 def
/twist 0 def
/xscl 0 def
/yscl 0 def
/eang 0 def
/bang 0 def
/NwScrn false def
%
% drawing definitions
%
/sclm [0 0 0 0 0 0] def
/setscl {
/deltay exch neg def
/deltax exch neg def
100 div /twist xdef
100 div /slant xdef
cmatrix setmatrix deltax neg deltay neg translate
sclm 0 twist cos put
sclm 1 twist sin put
sclm 2 slant sin neg put
sclm 3 slant cos put
sclm concat
/omatrix omatrix currentmatrix def
} bdef
/scl {
deltay add exch
deltax add exch
transform round .2 add exch round .2 add exch itransform
} bdef
/NW {newpath} bdef
/MT {scl moveto} bdef
/LT {scl lineto} bdef
/CRV {scl 6 2 roll scl 6 2 roll scl 6 2 roll curveto} bdef
/AT {
100 div /eang xdef 100 div /bang xdef
/yscl xdef /xscl xdef scl translate
xscl yscl scale 0 0 1 bang eang
arc omatrix setmatrix
} bdef
/AN {
100 div /eang xdef 100 div /bang xdef
/yscl xdef /xscl xdef scl translate
xscl yscl scale 0 0 1 bang eang
arcn omatrix setmatrix
} bdef
/CP {closepath} bdef
/LTYPE {0 setdash setlinewidth} bdef
%
% - BeginDoc -
%
/BeginDoc {
7 dict begin
/FontDict 12 dict def
FontDict begin
/cache true def
/key /mypatternfont def
/patterns 256 array def
/patterncount 1 def
/char 1 def
/mtx [300 72 div 0 0 300 72 div 0 0] matrix invertmatrix def
/height 30 def
/width 30 def
/ctm matrix currentmatrix def
/ptm matrix identmatrix def
/str ( ) def
end
/FontBBox [0 0 FontDict /width get FontDict /height get] def
/FontMatrix FontDict /mtx get def
/Encoding 256 array 0 1 255 {1 index exch dup put} for def
/FontType 3 def
/BuildChar { %def
exch begin
FontDict begin
/char xdef
cache
{width 0 0 0 width height setcachedevice}
{width 0 setcharwidth}
ifelse
width height scale 16 16 true [16 0 0 -16 0 16] {patterns char get} imagemask
end end
} def
FontDict /key get currentdict definefont pop
end
}bdef
%
% angle cx cy cropmark -
%
/cropmark {
gsave translate rotate
newpath
bh 6 add 0 moveto 20 0 rlineto
0 bv 6 add moveto 0 20 rlineto
stroke grestore
} bdef
%
% cx cy regmark -
%
/regmark {
gsave translate
newpath
10 0 moveto 0 0 10 0 360 arc
1 SG fill
8 0 moveto 0 0 8 0 360 arc
-10 0 moveto 10 0 lineto 0 -10 moveto 0 10 lineto
0 SG stroke
4 0 moveto 0 0 4 0 360 arc
fill
-4 0 moveto 4 0 lineto 0 -4 moveto 0 4 lineto
1 SG stroke
grestore
} bdef
%
% cx cy slurgauge -
%
/slurgauge {
gsave translate
newpath
0 0 10 0 360 arc
1 SG fill
0 0 10 0 360 arc
0 SG stroke
36 { 1 0 moveto 0 0 10 -2.5 2.5 arc fill 10 rotate} repeat
grestore
} bdef
%
% string cx cy label -
%
/label {
gsave translate 90 rotate
/Courier findfont 8 scalefont setfont
0 0 moveto show
0 -8 moveto
currentscreen pop exch 20 string cvs show ( lpi ) show
20 string cvs show (\312 ) show
docscale 20 string cvs show (%) show
grestore
} bdef
%
% angle cx cy colorstrip -
%
/boxit {newpath moveto 14 0 rlineto 0 -14 rlineto -14 0 rlineto closepath} def
/colorstrip {
gsave translate rotate
/Courier findfont 6 scalefont setfont
psepmode 0 eq {
0 8 translate
0 1 9 {dup 15 mul 0 boxit 10 div SG fill} for
}if
psepmode 1 eq {
gsave 320 15 translate
0 0 boxit .5 .41 .41 0 setcmykcolor fill
15 0 boxit 0 0 0 .5 setcmykcolor fill
30 0 boxit 1 1 0 0 setcmykcolor fill
45 0 boxit 1 0 1 0 setcmykcolor fill
60 0 boxit 0 1 1 0 setcmykcolor fill
75 0 boxit 1 1 1 0 setcmykcolor fill
1 SG
33 -6 moveto (CM) show
48 -6 moveto (CY) show
63 -6 moveto (MY) show
77 -6 moveto (CMY) show
grestore
pblack 0 ne {0 15 translate (K)} if
pcyan 0 ne {0 0 translate (C)} if
pmagenta 0 ne {160 15 translate (M)} if
pyellow 0 ne {160 0 translate (Y)} if
-6 -6 moveto 0 SG show
0 1 9 {dup 15 mul 0 boxit 10 div SG fill} for
}if
psepmode 2 eq {
320 0 translate
0 1 9 {dup 15 mul 0 boxit 10 div SG fill} for
}if
grestore
} def
%
% tilestring sepmode cyan magenta yellow black
% negative mirror cropmarks manualfeed landscape scale
% documentwidth documentheight paperw paperh tilex tiley tilew tileh
% bh bv frequency angle copies iseps BEGINTILE
%
/begintile {
/iseps xdef
/#copies xdef
/cangle xdef
/cfreq xdef
/bv xdef
/bh xdef
/tileh xdef
/tilew xdef
/tiley xdef
/tilex xdef
/paperh xdef
/paperw xdef
/doch xdef
/docw xdef
/docscale xdef
/landscape xdef
/manual xdef
/cropmarks xdef
/mirror xdef
/negative xdef
/pblack xdef
/pyellow xdef
/pmagenta xdef
/pcyan xdef
/psepmode xdef
/tilename xdef
/dmatrix dmatrix currentmatrix def
bh 0 ge {/bleed true def}{/bleed false def /bh 0 def /bv 0 def}ifelse
iseps {
/cropmarks false def
/bleed false def /bh 0 def bv 0 def
/mirror false def
/negative false def
/manual false def
}
{
statusdict /setpageparams known
{
mirror {statusdict /mirrorprint known {statusdict /mirrorprint true put /mirror false def}if }if
negative {statusdict /negativeprint known {statusdict /negativeprint true put /negative false def}if }if
statusdict begin tileh tilew cropmarks {72 add exch 72 add exch}if 0 0 setpageparams end
}
{
paperw 612 eq paperh 1008 eq and {/legal where{pop legal}if} if
paperw 612 eq paperh 792 eq and {/letter where{pop letter}if} if
} ifelse
} ifelse
/leftclip paperw tilew cropmarks {72 add bh 2 mul add}if sub 2 div def
/topclip paperh tileh cropmarks {72 add bv 2 mul add}if sub 2 div def
leftclip topclip translate
mirror {docw 0 translate -1 1 scale} if
negative {{1 exch sub} settransfer newpath clippath 1 SG fill} if
manual {statusdict /manualfeed known {statusdict /manualfeed true put}if }if
tilex neg tiley neg translate
currentscreen /dproc xdef /dangle xdef /dfreq xdef
/dtrans currenttransfer def
cangle 10000 gt {/cangle dangle def} if
cfreq 10000 gt {/cfreq dfreq def} if
cfreq cangle /dproc load setscreen
psepmode 0 eq {systemdict /setcmykcolor known not
{/setcmykcolor
{1 sub 4 1 roll 3 {3 index add neg dup 0 lt{pop 0}if 3 1 roll}
repeat setrgbcolor pop} bdef}if
/setgray /SG load def
} if
psepmode 1 eq {
pcyan 0 ne {/setcmykcolor {pop pop pop 1 exch sub SG}bdef /setgray {pop 1 SG}bdef } if
pmagenta 0 ne {/setcmykcolor {pop pop 1 exch sub SG pop}bdef /setgray {pop 1 SG}bdef } if
pyellow 0 ne {/setcmykcolor {pop 1 exch sub SG pop pop}bdef /setgray {pop 1 SG}bdef } if
pblack 0 ne {/setcmykcolor {1 exch sub SG pop pop pop}bdef /setgray /SG load def } if
} if
psepmode 2 eq {/setcmykcolor {
pblack 10000 div eq exch
pyellow 10000 div eq and exch
pmagenta 10000 div eq and exch
pcyan 10000 div eq and {0 SG}{1 SG}ifelse}bdef
pblack 10000 eq pyellow 0 eq and pmagenta 0 eq and pcyan 0 eq and
{/setgray /SG load def}{/setgray {pop 1 SG} bdef} ifelse
} if
cropmarks {
mirror {bh 36 add neg bv 36 add translate}{bh 36 add bv 36 add translate}ifelse
gsave
0 SG [] 0 setdash .3 setlinewidth 0 setlinejoin 0 setlinecap
180 tilex tiley cropmark
270 tilex tilew add tiley cropmark
0 tilex tilew add tiley tileh add cropmark
90 tilex tiley tileh add cropmark
tilew 2 div tilex add 18 tiley add tileh add bv add regmark
tilew 2 div tilex add -18 tiley add bv sub regmark
tilex bh sub 18 sub tiley bv sub 18 sub slurgauge
tilex tilew add bh add 18 add tiley tileh add bv add 18 add slurgauge
tilename tilex bh sub 18 sub tiley 18 add label
90 tilex tilew add bh add 18 add tiley 18 add colorstrip
grestore
} if
bleed {
tilex bh sub tiley bv sub moveto
tilex tilew add bh add tiley bv sub lineto
tilex tilew add bh add tiley tileh add bv add lineto
tilex bh sub tiley tileh add bv add lineto
clip
} if
landscape {-90 rotate doch neg 0 translate} if
docscale 10000.0 div dup scale
/cmatrix cmatrix currentmatrix def
/NwScrn false def
} bdef
%
%
%
/endtile {
manual {statusdict /manualfeed known {statusdict /manualfeed false put}if } if
dmatrix setmatrix
} bdef
%
% - patternpath -
%
/patternpath { %def
/mypatternfont findfont begin FontDict /ctm get setmatrix
currentdict setfont
FontDict begin
FontMatrix concat
width 0 dtransform
round width div exch round width div exch
0 height dtransform
round height div exch
round height div exch
0 0 transform round exch round exch
ptm astore setmatrix
pathbbox
height div ceiling height mul 4 1 roll
width div ceiling width mul 4 1 roll
height div floor height mul 4 1 roll
width div floor width mul 4 1 roll
2 index sub height div ceiling cvi exch
3 index sub width div ceiling cvi exch
4 2 roll moveto
FontMatrix ptm invertmatrix pop
{ %repeat
gsave
ptm concat
dup {str show} repeat
grestore
0 height rmoveto
} repeat
pop
end end
} bdef
%
% - patternfill -
%
/patternfill { %def
gsave
1 setgray
fill
grestore
gsave
clip patternpath
grestore
newpath
} bdef
%
% - patternfill -
%
/patterneofill { %def
gsave
1 setgray
fill
grestore
gsave
eoclip patternpath
grestore
newpath
} bdef
/patternstroke {
strokepath patternfill
} bdef
%
% ax ay string patternashow -
%
/patternashow {
(0) exch
{ %forall
2 copy 0 exch put pop dup
false charpath
currentpoint
patternfill
moveto
3 copy pop rmoveto
} forall
pop pop pop
} bdef
%
% string patternshow -
%
/patternshow {
(0) exch
{ %forall
2 copy 0 exch put pop dup
false charpath
currentpoint
patternfill
moveto
} forall
pop
} bind def
%
% <pattern> shade PTRN -
%
/PTRN {
/shade xdef
/pattern xdef
/mypatternfont findfont begin
FontDict begin
true
1 1 patterncount {
dup patterns exch get pattern eq
{str exch 0 exch put pop false exit}
if
pop
}for
{
patterns patterncount pattern put
str 0 patterncount put
/patterncount patterncount 1 add def
}if
end
end
/MF {gsave patterneofill grestore} bdef
/MS {gsave patternstroke grestore} bdef
/SW {patternshow} bdef
1 shade 10000 div sub SG
} bdef
%
% shade SHADE -
%
/SHADE {
/shade xdef
NwScrn {
cfreq cangle /dproc load setscreen
/NwScrn false def
}if
/MF {gsave eofill grestore} bdef
/MS {gsave stroke grestore} bdef
/SW /show ldef
1 shade 10000 div sub SG
} bdef
%
% <pattern> c m y k CMYKPTRN -
%
/CMYKPTRN {
/k xdef
/y xdef
/m xdef
/c xdef
/pattern xdef
/mypatternfont findfont begin
FontDict begin
true
1 1 patterncount {
dup patterns exch get pattern eq
{str exch 0 exch put pop false exit}
if
pop
}for
{
patterns patterncount pattern put
str 0 patterncount put
/patterncount patterncount 1 add def
}if
end
end
/MF {gsave patterneofill grestore} bdef
/MS {gsave patternstroke grestore} bdef
/SW {patternshow} bdef
c 10000 div m 10000 div y 10000 div k 10000 div setcmykcolor
} bdef
%
% c m y k CMYK -
%
/CMYK {
/k xdef
/y xdef
/m xdef
/c xdef
/MF {gsave eofill grestore} bdef
/MS {gsave stroke grestore} bdef
/SW /show ldef
c 10000 div m 10000 div y 10000 div k 10000 div setcmykcolor
} bdef
%
% pixelw pixelh bitsperpixel picx picy pfreq pangle PUTPIC savestate
%
/putpic {
/pangle xdef
/pfreq xdef
/ysize xdef
/xsize xdef
/bpp xdef
/h xdef
/w xdef
pfreq 10000 lt {pfreq}{cfreq} ifelse
pangle 10000 lt {pangle}{cangle} ifelse
/dproc load setscreen
xsize 2 div neg ysize 2 div neg translate
xsize ysize scale
/NwScrn true def
save
/picstr 8 bpp idiv dup w add 1 sub exch idiv string def
w h bpp [w 0 0 h neg 0 h] {currentfile picstr readhexstring pop}bind image
} bdef
%
% pixelw pixelh bitsperpixel picx picy pfreq pangle PUTRGBPIC savestate
%
/putrgbpic {
/pangle xdef
/pfreq xdef
/ysize xdef
/xsize xdef
/bpp xdef
/h xdef
/w xdef
pfreq 10000 lt {pfreq}{cfreq} ifelse
pangle 10000 lt {pangle}{cangle} ifelse
/dproc load setscreen
xsize 2 div neg ysize 2 div neg translate
xsize ysize scale
/NwScrn true def
save
/picstr 8 bpp idiv dup w add 1 sub exch idiv string def
w h bpp [w 0 0 h neg 0 h] {currentfile picstr readhexstring pop}bind false 3 colorimage
} bdef
%
% savestate ENDPIC -
%
/endpic {
restore
} bdef
%
% newx newy origx origy llx lly urx ury BGNEPS -
%
/bgneps {
/ury xdef
/urx xdef
/lly xdef
/llx xdef
/origy xdef
/origx xdef
/newy xdef
/newx xdef
100 newx origx div mul 100 newy origy div mul scale
urx llx add -2 div ury lly add -2 div translate
/PgsEpsSave save def /showpage {} bdef
llx lly moveto llx ury lineto urx ury lineto urx lly lineto clip
newpath [] 0 setdash 1 setlinewidth 0 SG
} bdef
%
% - ENDEPS -
%
/endeps {PgsEpsSave restore} bdef
%
%
%
/doendstyle {
scl /taily exch def /tailx exch def
scl /tipy exch def /tipx exch def
gsave newpath 1 eq
{
/halfhead currentlinewidth dup 125 gt {1.5}{2} ifelse mul def
/headlength halfhead 5 mul def
/dx tipx tailx sub def
/dy tipy taily sub def
/arrowlength dx dx mul dy dy mul add sqrt def
/angle dy dx atan def
/base arrowlength headlength sub def
tailx taily translate
angle rotate
base halfhead neg moveto
arrowlength 0 lineto
base halfhead lineto
closepath fill
base 0 transform
}
{
tipx tipy currentlinewidth 2 div 0 360 arc fill
tipx tipy transform
} ifelse
grestore itransform} bdef
/BS {doendstyle moveto} bdef
/ES {doendstyle lineto MS} bdef
%
% font xpoint ypoint attribute SETFP
%
/sfpm [0 0 0 0 0 0] def
/setfp {
/curattr xdef /curypoint xdef /curxpoint xdef /curfont xdef
sfpm 0 curxpoint put
sfpm 3 curypoint put
curfont findfont sfpm
dup 2 0 put
2 curattr and 0 ne {dup 2 curypoint 3 div put} if
16 curattr and 0 ne {dup 2 curypoint 3 div neg put} if
128 curattr and 0 ne {dup 0 curxpoint neg put} if
256 curattr and 0 ne {dup 3 curypoint neg put} if
makefont setfont
} bdef
%
% - FONTSAVE -
%
/fontsave {
/PgsFontSave save def
} bdef
%
% - FONTRESTORE -
%
/fontrestore {
currentgray slant 100 mul twist 100 mul deltax neg deltay neg
PgsFontSave restore
setscl setgray
} bdef
%
% - PAGESAVE -
%
/pagesave {
/PgsPageSave save def
} bdef
%
% - PAGERESTORE -
%
/pagerestore {
PgsPageSave restore
} bdef
%
% cwidth A -
%
/a {/cwidth xdef
% reverse
64 curattr and 0 ne
{gsave 0 curypoint .75 mul rmoveto cwidth 0 rlineto
0 curypoint neg rlineto cwidth neg 0 rlineto closepath fill grestore
gsave 1 SG } if
% underline
512 curattr and 0 ne
{curypoint 40 div setlinewidth [] 0 setdash
gsave 0 curypoint .05 mul neg rmoveto
cwidth 0 rlineto stroke grestore} if
% double underline
4096 curattr and 0 ne
{curypoint 40 div setlinewidth [] 0 setdash
gsave 0 curypoint .05 mul neg rmoveto
cwidth 0 rlineto stroke grestore
gsave 0 curypoint .15 mul neg rmoveto
cwidth 0 rlineto stroke grestore} if
% strike through
8192 curattr and 0 ne
{curypoint 40 div setlinewidth [] 0 setdash
gsave 0 curypoint .3 mul rmoveto
cwidth 0 rlineto stroke grestore} if
%
64 curattr and 0 ne
{grestore} if
} bdef
%
% cwidth newx newy B -
%
/b {newpath scl moveto a} bdef
%
% cchar cwidth R -
%
/r {/cwidth xdef /cchar xdef
gsave
curattr 0 eq {cchar SW}
{
% reverse
64 curattr and 0 ne
{1 SG} if
% shadow
4 curattr and 0 ne
{curypoint 160 div setlinewidth [] 0 setdash
32 curattr and 0 ne
{64 curattr and 0 ne
{gsave .5 SG curxpoint 12 div curypoint 12 div neg rmoveto cchar SW grestore
gsave cchar SW grestore}
{gsave currentgray 1 add .5 mul SG curxpoint 12 div curypoint 12 div neg rmoveto cchar SW grestore
gsave cchar SW grestore} ifelse
}
{64 curattr and 0 ne
{gsave curxpoint 12 div curypoint 12 div neg rmoveto cchar SW grestore
gsave 0 SG cchar SW grestore
gsave cchar true charpath stroke grestore}
{gsave curxpoint 12 div curypoint 12 div neg rmoveto cchar SW grestore
gsave 1 SG cchar SW grestore
gsave cchar true charpath stroke grestore} ifelse
} ifelse
} if
% outline
8 curattr and 0 ne
{curypoint 160 div setlinewidth [] 0 setdash
64 curattr and 0 eq {gsave 1 SG cchar SW grestore} if
gsave cchar true charpath stroke grestore} if
% light
32 curattr and 0 ne
{64 curattr and 0 ne {.5} {currentgray 1 add .5 mul} ifelse SG} if
% mirror
128 curattr and 0 ne
{cchar stringwidth pop neg 0 rmoveto} if
% upside down
256 curattr and 0 ne
{0 curypoint .6 mul rmoveto} if
%
curattr 12 and 0 eq
{ curattr 1 and 0 ne
{curxpoint 48 div dup neg -10 exch
{gsave 0 rmoveto cchar SW grestore} for}
{cchar SW}ifelse
}if
} ifelse
grestore cwidth 0 rmoveto} bdef
%
% cchar cwidth newx newy P -
%
/p {newpath scl moveto r} bdef
end
%%EndProlog