Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!pacific.mps.ohio-state.edu!zaphod.mps.ohio-state.edu!brutus.cs.uiuc.edu!ux1.cso.uiuc.edu!ux1.cso.uiuc.edu!uxc.cso.uiuc.edu!wnk From: wnk@uxc.cso.uiuc.edu Newsgroups: comp.sys.sgi Subject: a postscript/background question Message-ID: <209000001@uxc.cso.uiuc.edu> Date: 3 May 90 14:02:00 GMT Lines: 54 Nf-ID: #N:uxc.cso.uiuc.edu:209000001:000:1644 Nf-From: uxc.cso.uiuc.edu!wnk May 3 09:02:00 1990 I have started playing with postscript lately, and I figured the best way to test out what I've learned is to make nifty backgrounds for my 4D/20TG workstation. Well the first thing I tried was to draw a smiley face. (The code is included at the end of the article). What I found was that you can't set the line width, or do partial circles. If you try, the login process dies, and you have to login with NOGRAPHICS set and edit your startup.ps to remove the offending lines. Now, I've tested this same code with psview and printed it on a postscript printer, and it works fine there. I also discovered how to have psview draw to the background instead of its window, which is what the code at the end of the note does. However, when I put it in my startup.ps it bombs. Could anyone give a novice some insight as to what he's doing wrong? Any help would be greatly appreciated. ----------------------------------------------------------------------------- %! % "Smiley" /doCircle % draw a filled circle { 0 360 arc fill } def /doArc % draw an arc { 200 340 arc stroke } def /DrawSmile { 1.0 1.0 0 setrgbcolor % set color to yellow 500 400 300 doCircle % draw face 0 0 0 setrgbcolor % set color to black 400 520 25 doCircle % draw eyes 600 520 25 doCircle 4 setlinewidth % set line width 500 350 150 doArc % draw mouth as 140 degree arc } bind def /PaintRoot { gsave framebuffer setcanvas 0 0.392 1 setrgbcolor % set background color clippath fill % fill background DrawSmile grestore } def PaintRoot showpage %EndOfFile ---------- Walter Kreiling wnk@aquifer.las.uiuc.edu