[comp.lang.postscript] example: no smoking

mar@athena.mit.edu (Mark A. Rosenstein) (01/30/88)

There've been two requests for this recently, so I made one up.  This
is nothing fancy, but it will print a simple no smoking sign on an
8.5x11 inch piece of paper.
					-Mark
mit-eddie!athena.mit.edu!mar				mar@athena.mit.edu
		Variables won't and constants aren't.

----------------------------------------------------------------
%! Handwritten postscript by
%  Mark Rosenstein, <mar@athena.mit.edu>
%  29 Jan 1988

% first the cigarette, with a gray end
30 setlinewidth
160 400 moveto 200 400 lineto .5 setgray stroke 0 setgray
200 400 moveto 440 400 lineto stroke

% now some curling smoke
10 setlinewidth
170 420 moveto 170 540 300 400 300 500 curveto stroke
190 420 moveto 190 500 320 375 320 500 curveto stroke

% and the circle-slash
%   we'll white out a little of the cigarette on either side
%   of the slash first
50 setlinewidth
170 270 moveto 440 520 lineto gsave 1 setgray stroke grestore

% and append the circle to the slash path
30 setlinewidth
305 395 184 45 405 arc
stroke

% Now put some text underneath it
/Helvetica findfont 52 scalefont setfont
140 100 moveto (NO SMOKING) show

showpage