Newsgroups: comp.text Path: utzoo!sq!lee From: lee@sq.sq.com (Liam R. E. Quin) Subject: Re: Shaded Boxes in PIC Message-ID: <1989Nov15.171726.28275@sq.sq.com> Reply-To: lee@sq.com (Liam R. E. Quin) Organization: Unixsys (UK) Ltd References: <546@dcdwest.UUCP> <127725@sun.Eng.Sun.COM> Date: Wed, 15 Nov 89 17:17:26 GMT > > I would like to know how to shade a box or other closed form > > in pic. Since pic emits troff instructions, you are limited by what troff can do. Now, whilst commercial versions of troff might allow one to fill and shade boxes, most versions do not. But do not despair! Pic has "for" loops, and you can use these to draw lots of dotted lines. You will need to experiment a little with this, but here is the idea. .\" demonstration of shading in pic .\" Liam R. QUin, Unixsys (UK) Ltd., 1989 .PS A: box # draw the border # now shade it a little # use small dots (3 pt) .ps 3 # change the 20 and 50 to alter the shading intensity. for j = 0 to boxht by boxht / 20 do Y for i = 0 to boxwid by boxwid/50 do X "\&." at A.sw + (i, j) X Y .ps 10 box "Hello!" at A .PE Hope this helps. Another approach is to define a PostScript font containing little grey squares, but this is less general, and harder to describe! Lee -- Liam R. Quin, Unixsys (UK) Ltd [note: not an employee of "sq" - a visitor!] lee@sq.com (Whilst visiting Canada from England) lee@anduk.co.uk (Upon my return to England at Christmas)