Article View: comp.lang.postscript
Article #5357Re: Negative needed
From: David H. Brown
Date: Sat, 13 Apr 1991 21:54
Date: Sat, 13 Apr 1991 21:54
49 lines
2554 bytes
2554 bytes
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
<settransfer> function controls the mapping of input values for <setgray> to
halftones created by <setscreen>.
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 <settransfer>. If you put it
after, you'll just have to make it:
[...] 1 setgray fill
The <settransfer> 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
<showpage> 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
Technical Details
Message-ID:
<1991Apr13.215415.15575@news.stolaf.edu>Path:
arc1-ca.pugleaf.net!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!browndReferences:
<1991Apr11.124626.12325@pbs.org> <1947@chinacat.Unicom.COM>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!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