🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #7391

wishful thinking

#7391
From: Russell J. Wilcox
Date: Mon, 08 Aug 1988 00:35
32 lines
1833 bytes
I wish...

I wish there were a way to figure out whether a given point would
be painted black.  I can't figure out how to do this, except to 
go through each path (thousands of 'em, I know) and test to see if
the point is: inside the path if it was filled or within a setlinewidth
if it was stroked.  It seems impossible even to do this, however, since 
only the Postscript interpreter knows for sure which points are 
finally painted black, especially for bit-mapped images and greytones.

Still, would it be possible to declare some "special points" at the
beginning of your program, some hot spots or watch-dog points?  And have
a PostScript function which returned an array of booleans saying whether
each spot had been drawn/filled/bit-mapped/stroked over?  

Does anyone know if this is theoretically possible?  I can think of some
nice uses, like finding the bounding box of an object without printing 
it out and measuring (pathbbox won't take clipping into account, or 
at least, I can't seem to get it to do this).  Or positioning paths to
intersect at certain points without hard-coding the position at the other
path...

I would really be interested to hear if anyone knows of good short-cuts
around this "lack."  Also, does anyone know whether such a function is
possible within the PostScript universe?  Even if you think not, please
explain why.

Just some wishful thinking from a beginning PostScript programmer... :-)

--
Russell Wilcox
rjw@wjh12.harvard.edu
Technical Details
Message-ID: <275@wjh12.harvard.edu>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!husc6!wjh12!rjw

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!husc6!wjh12!rjw
From: rjw@wjh12.harvard.edu (Russell J. Wilcox)
Newsgroups: comp.lang.postscript
Subject: wishful thinking
Message-ID: <275@wjh12.harvard.edu>
Date: 8 Aug 88 00:35:17 GMT
Reply-To: rjw@wjh12.UUCP (Russell J. Wilcox)
Organization: Harvard University, Cambridge MA
Lines: 32