rjw@wjh12.harvard.edu (Russell J. Wilcox) (08/08/88)
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