[comp.lang.postscript] Smiley picture

sergem@usage.csd.unsw.oz (Serge (Could be worse) MALEV) (12/27/88)

Here is something I made to start using PostScript language.

===============================cut cut cut cut================================
#! /bin/sh
# This is a shell archive, meaning:
# 1. Remove everything above the #! /bin/sh line.
# 2. Save the resulting text in a file.
# 3. Execute the file with /bin/sh (not csh) to create:
#	smiley1.ps
# This archive created: Tue Dec 27 17:17:24 1988
# By:	Serge (Could be worse) MALEV (AcCUCSDUNSW)
export PATH; PATH=/bin:/usr/bin:$PATH
if test -f 'smiley1.ps'
then
	echo shar: "will not over-write existing file 'smiley1.ps'"
else
sed 's/^X//' << \SHAR_EOF > 'smiley1.ps'
X/inch {72 mul} def
X/ellipsedict 8 dict def
Xellipsedict /mtrx matrix put
X
X/ellipse
X { ellipsedict begin
X   /endangle exch def
X   /startangle exch def
X   /yrad exch def
X   /xrad exch def
X   /y exch def
X   /x exch def
X   /savematrix mtrx currentmatrix def
X   x y translate
X   xrad yrad scale
X   0 0 1 startangle endangle arc
X   savematrix setmatrix
X   end
X } def
X
Xgsave
X 0.07 inch setlinewidth
X newpath
X  300 400 250 250 0 360 ellipse
Xgsave
X  0.9 setgray
X fill
Xgrestore
X
X newpath
X  400 300 30 50 0 360 ellipse
X fill
X newpath
X  200 300 30 50 0 360 ellipse
X fill
X
X newpath
X  300 400 200 200 10 170 ellipse
X stroke
X
X newpath
X  119 420 moveto 89 450 lineto
X stroke
X newpath
X  481 420 moveto 511 450 lineto
X stroke
X
Xgrestore
X
Xshowpage
X
SHAR_EOF
fi
exit 0
#	End of shell archive