Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uwm.edu!spool.mu.edu!cs.umn.edu!msi.umn.edu!noc.MR.NET!news.stolaf.edu!agnes.acc.stolaf.edu!brownd From: brownd@agnes.acc.stolaf.edu (David H. Brown) Newsgroups: comp.lang.postscript Subject: Re: Negative needed Message-ID: <1991Apr13.215415.15575@news.stolaf.edu> Date: 13 Apr 91 21:54:15 GMT References: <1991Apr11.124626.12325@pbs.org> <1947@chinacat.Unicom.COM> Sender: news@news.stolaf.edu Reply-To: brownd@agnes.acc.stolaf.edu () Organization: St. Olaf College; Northfield, MN Lines: 49 In article <1947@chinacat.Unicom.COM> woody@chinacat.Unicom.COM (Woody Baker @ Eagle Signal) writes: >In article <1991Apr11.124626.12325@pbs.org>, rfutscher@pbs.org writes: >> If I plot to a postscript file is there a way to edit the >> postscript file so that the drawing is printed as a negitive? >> >Look through the file for the word setray. It may be used in >a procedure definition to make the file more compact. IF it is, then >examine it carefuly, and see what the incoming parameter is. You can then >modify the definition to complement the incoming paramater. > >Alternatly, you could search for every occurance of setgray or the >re-defintion of it, and alter the parameter. > >Cheers' >Woody Aargh! This might not work, and there's a much faster way! The function controls the mapping of input values for to halftones created by . So all you need to do is insert the command: {1 exch sub} settransfer in the PostScript file before it starts drawing, and the complements will be used automatically. Of course, this won't work just by itself, as Woody's probably won't, for the simple reason that you'll be drawing white lines on white paper! This line: 0 0 moveto 0 792 lineto 612 792 lineto 612 0 lineto closepath 0 setgray fill will plot a box around a 8-1/2 by 11" page and fill it with black. Of course, this line should occur _before_ you redefine . If you put it after, you'll just have to make it: [...] 1 setgray fill The can be enclosed in a gsave/grestore if non-negative drawing needs to be done. Also, the routine to fill the page with black must be done for each page; if the document has multiple pages, insert the "1 setgray" version after each call. And, I guess, there's always the possibility that the code would use settransfer itself. Then things would be more complicated... Dave Brown brownd@agnes.acc.stolaf.edu