Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!uunet!pcrat!rick From: rick@pcrat.uucp (Rick Richardson) Newsgroups: comp.text Subject: Re: Shaded Boxes in PIC Message-ID: <1989Nov16.144956.9559@pcrat.uucp> Date: 16 Nov 89 14:49:56 GMT References: <546@dcdwest.UUCP> <127725@sun.Eng.Sun.COM> <1989Nov15.171726.28275@sq.sq.com> Reply-To: rick@pcrat.UUCP (Rick Richardson) Organization: PC Research, Inc., Tinton Falls, NJ Lines: 42 In article <1989Nov15.171726.28275@sq.sq.com> lee@sq.com (Liam R. E. Quin) writes: >> > 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. Actually, troff does little with the drawing primitives that "pic" emits. The postprocessor does all the work. It is possible to produce shaded objects if your postprocessor is up to it. Ideally, of course, the "pic" language should be extended to make this more convenient. As it is, JetRoff uses the transparent pass-thru feature to do shaded/patterned rectangles only, with the command: \X'shade percent xpos ypox width height' I've toyed with the idea of providing arbitrary fills of an enclosed area, such as what typical "paint" programs do, with a pass-thru like: \X'shadefill percent xpos ypox' Assuming that 'xpos, ypos' was a coordinate within an area enclosed by one or more lines, circles, elipses, arcs, or splines, this pass-thru would flood fill up to the boundaries of the area. We start to get into an area of functionality, though, where a screen oriented drawing program would be better use of time than the pic language. Its output could be either postscript, or for portability, a richer set of troff compatible *standard* primitives (either pass-thrus or builtins). I believe that I mentioned this (a richer set of drawing primitives) to Brian Kernighan as a wish list item for his next version of troff. -- Rick Richardson | JetRoff "di"-troff to LaserJet Postprocessor| Ask about PC Research,Inc.| Mail: uunet!pcrat!jetroff; For anon uucp do:| FaxiX uunet!pcrat!rick| uucp jetroff!~jetuucp/file_list ~nuucp/. | for UNIX/386 jetroff Wk2200-0300,Sa,Su ACU {2400,PEP} 12013898963 "" \d\r\d ogin: jetuucp