Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!rutgers!ames!sdcsvax!nosc!humu!uhccux!lee From: lee@uhccux.UUCP (Greg Lee) Newsgroups: comp.sys.amiga Subject: postscript interpreter binaries Message-ID: <802@uhccux.UUCP> Date: Wed, 16-Sep-87 10:22:44 EDT Article-I.D.: uhccux.802 Posted: Wed Sep 16 10:22:44 1987 Date-Received: Sat, 19-Sep-87 01:14:00 EDT Organization: U. of Hawaii, Manoa (Honolulu) Lines: 354 Keywords: postscript Here are some short demonstration programs in PostScript for the PostScript emulator posted previously. They can be run with redirection; e.g. "ps < color-chart". * * Greg Lee, August, 1987. * U.S. mail: 562 Moore Hall, Dept. of Linguistics * University of Hawaii, Honolulu, HI 96822 * INTERNET: lee@uhccux.uhcc.hawaii.edu * UUCP: {ihnp4,dcdwest,ucbvax}!sdcsvax!nosc!uhccux!lee * BITNET: lee%uhccux.uhcc.hawaii.edu@rutgers.edu ---------------------CUT HERE----------------------------------- # This is a shell archive. Remove anything before this line # then unpack it by saving it in a file and typing "sh file" # (Files unpacked will be owned by you and have default permissions). # This archive contains the following files: # ./a-box # ./color-chart # ./psedit # ./rotate-box # ./show-fonts # ./thick-letters # if `test ! -s ./a-box` then echo "writing ./a-box" sed 's/^X//' > ./a-box << '\Rogue\Monster\' X Xsave X X/A { /simplex findfont 100 scalefont setfont X 300 100 moveto X (A) true charpath X stroke X } def X X/B { 100 100 moveto X 100 200 lineto X 200 200 lineto X 200 100 lineto X closepath X stroke X } def X X 2 pencolor 18 setlinewidth B A X 1 pencolor 8 setlinewidth B A X 3 pencolor 4 setlinewidth B A X Xrestore X \Rogue\Monster\ else echo "will not over write ./a-box" fi if [ `wc -c ./a-box | awk '{printf $1}'` -ne 346 ] then echo `wc -c ./a-box | awk '{print "Got " $1 ", Expected " 346}'` fi if `test ! -s ./color-chart` then echo "writing ./color-chart" sed 's/^X//' > ./color-chart << '\Rogue\Monster\' X X% Set up colors and show chart X Xsave X1 penmode X Xerasepage X X/xpos 0 def X/ypos 364 def X X/boxwidth 10 def X/boxheight 20 def X X/nextx { /xpos xpos boxwidth add def } def X/nexty { /xpos 0 def /ypos ypos boxheight sub def } def X X/onebox { X xpos ypos xpos boxwidth add ypos boxheight sub box X nextx X } def X X/fourbox { X .6 setgray onebox X .3 setgray onebox X .1 setgray onebox X 0 setgray onebox X } def X X/boxrow { X 0 1 15 X { pencolor fourbox } X for X } def X X/allbox { X 0 1 15 X { penbcolor boxrow nexty } X for X } def X X 0 pencolor 2 2 2 setrgbcolor % black X 1 pencolor 11 11 11 setrgbcolor % white X 2 pencolor 3 12 3 setrgbcolor % green X 3 pencolor 13 4 2 setrgbcolor % red X 4 pencolor 0 0 15 setrgbcolor % blue X 5 pencolor 12 12 0 setrgbcolor % yellow X 6 pencolor 0 8 2 setrgbcolor % olive X 7 pencolor 10 0 9 setrgbcolor % wine X 8 pencolor 6 2 0 setrgbcolor % rust X 9 pencolor 0 6 6 setrgbcolor % sea X10 pencolor 9 15 1 setrgbcolor % apple X11 pencolor 14 11 0 setrgbcolor % orange X12 pencolor 12 0 4 setrgbcolor % fire X13 pencolor 9 2 15 setrgbcolor % grape X14 pencolor 12 7 7 setrgbcolor % salmon X15 pencolor 0 15 8 setrgbcolor % sky X X allbox X X X 2 pencolor 0 penbcolor 1 penmode X/topaz findfont 8 scalefont setfont X/theight 364 boxheight sub 6 add def X/txpos 2 def X/nexttext { txpos theight moveto X /txpos txpos 4 boxwidth mul add def X /theight theight boxheight sub def X } def X X nexttext (black) show X nexttext (white) show X nexttext (green) show X nexttext (red) show X nexttext (blue) show X nexttext (yellow) show X nexttext (olive) show X nexttext (wine) show X nexttext (rust) show X nexttext (sea) show X nexttext (apple) show X nexttext (orange) show X nexttext (fire) show X nexttext (grape) show X nexttext (salmon) show X nexttext (sky) show X Xrestore X X \Rogue\Monster\ else echo "will not over write ./color-chart" fi if [ `wc -c ./color-chart | awk '{printf $1}'` -ne 1925 ] then echo `wc -c ./color-chart | awk '{print "Got " $1 ", Expected " 1925}'` fi if `test ! -s ./psedit` then echo "writing ./psedit" sed 's/^X//' > ./psedit << '\Rogue\Monster\' X Xsave X X/infile (%stdin) (r) file def X/conin { infile read pop } def X X/char 1 string def X/buf 80 string def X X/leftmargin 50 def X/lineheight 20 def X/cursorheight lineheight 5 sub def X X/hpos 50 def X/vpos 300 def X X/cursoron { X currentpoint X 3 pencolor 2 penmode X currentpoint cursorheight add X 2 copy X exch 10 add exch lineheight sub X box X moveto X 1 pencolor 1 penmode X} def X X/newline { currentpoint exch pop leftmargin exch X lineheight sub moveto } def X X/edit { X{ Xnewpath Xcursoron Xchar 0 conin put Xcursoron Xchar 0 get 27 eq {exit} if Xchar 0 get 13 eq {newline} if Xchar 0 get 32 ge {char show} if X} Xloop X} def X X /simplex findfont 15 scalefont setfont X hpos vpos moveto X edit X Xrestore X \Rogue\Monster\ else echo "will not over write ./psedit" fi if [ `wc -c ./psedit | awk '{printf $1}'` -ne 718 ] then echo `wc -c ./psedit | awk '{print "Got " $1 ", Expected " 718}'` fi if `test ! -s ./rotate-box` then echo "writing ./rotate-box" sed 's/^X//' > ./rotate-box << '\Rogue\Monster\' X X3 pencolor X2 penmode Xsave X X/b {-10 -10 moveto X -10 10 lineto X 10 10 lineto X 10 -10 lineto X -10 -10 lineto X} def X X400 200 translate X X20 { b X fill X 5 rotate X 1.1 1.1 scale X } repeat X Xrestore X0 penmode X \Rogue\Monster\ else echo "will not over write ./rotate-box" fi if [ `wc -c ./rotate-box | awk '{printf $1}'` -ne 236 ] then echo `wc -c ./rotate-box | awk '{print "Got " $1 ", Expected " 236}'` fi if `test ! -s ./show-fonts` then echo "writing ./show-fonts" sed 's/^X//' > ./show-fonts << '\Rogue\Monster\' X Xsave X X/psize 20 string def X X/Fsample { X 2 copy X /simplex findfont 12 scalefont setfont X exch show X ( ) show X psize cvs show X exch findfont exch scalefont setfont X currentpoint exch pop 145 exch moveto X (abcdef ABCDEF ) show X } def X X/newline { X currentpoint exch pop 30 exch 30 sub X moveto X } def X X30 350 moveto X X(topaz) 8 Fsample newline X(topaz) 9 Fsample newline X(diamond) 12 Fsample newline X(garnet) 9 Fsample newline X(garnet) 16 Fsample newline X(ruby) 8 Fsample newline X(ruby) 12 Fsample newline X(sapphire)19 Fsample newline X(emerald) 20 Fsample newline X X restore X \Rogue\Monster\ else echo "will not over write ./show-fonts" fi if [ `wc -c ./show-fonts | awk '{printf $1}'` -ne 622 ] then echo `wc -c ./show-fonts | awk '{print "Got " $1 ", Expected " 622}'` fi if `test ! -s ./thick-letters` then echo "writing ./thick-letters" sed 's/^X//' > ./thick-letters << '\Rogue\Monster\' X Xsave X X2 pencolor 1 penmode X X/simplex findfont 12 scalefont setfont X X/char (x) def X X/tshow { false charpath stroke } def X X/caps { X 65 1 65 25 add % for A to Z X { char exch 0 exch put X char tshow } for X } def X X/small { X 97 1 97 25 add X { char exch 0 exch put X char tshow } for X } def X X 3 setlinewidth X X50 300 moveto small X50 250 moveto caps X X/simplex findfont 20 scalefont setfont X X50 200 moveto small X50 150 moveto caps X X Xrestore X \Rogue\Monster\ else echo "will not over write ./thick-letters" fi if [ `wc -c ./thick-letters | awk '{printf $1}'` -ne 460 ] then echo `wc -c ./thick-letters | awk '{print "Got " $1 ", Expected " 460}'` fi echo "Finished archive 1 of 1" # if you want to concatenate archives, remove anything after this line exit