I'm trying to get the Postscript export working for my Connectors documentation. I have fixed a couple of problems with the Bezier drawing (like using eofill rather than fill), and am now attacking the polygon drawing and filling.
However, I'm a bit puzzled about a few things (note that I really am NOT a Postscript programmer):
- The bounding box in the EPS output is too small by the 10x10 offset that is added, so the right edge of the printed Morph is clipped, and the morph is not centered in the resultant bbox.
- For some reason,
PostscriptCanvas>>frameAndFillRectangle:fillColor:borderWidth:topLeftColor:bottomRightColor:
draws an "inset border" on all filled, bordered rectangles -- even if the border style isn't inset! Is this *really* what we want? Wouldn't it make more sense to try to reproduce the *actual* style of the border?
- When exporting a Morph as Postscript, we use an extension of '.eps' even when not writing a valid EPS file (however, the file is much closer to a valid EPS file if you set the postscriptStoredAsEPS preference). Perhaps we should use a '.ps' extension when not writing an EPS.
- EPS files aren't supposed to do 'showpage', but we put one at the end of the file. Should we?
And we go to some lengths to redefine showpage so it's bracketed with a gsave/ grestore. Why?
/_showpageSqueak /showpage load def /showpage { gsave _showpageSqueak grestore } bind def
- EPS files aren't supposed to mess with global drawing state settings. However, we do this:
[ currenttransfer /exec cvx 1.2 /exp cvx ] cvx bind settransfer
which appears (to me) to be changing the gamma.
But what happens if you have several of these .EPS files in a single document? Won't the transfer function then be changed by each one of these?
And anyway, isn't the gamma *really* device-dependent? How would we know how much gamma correction to use if we don't know what devices they're viewing the original and the Postscript on? It's not like we can assume they're viewing the original on a Mac and printing on a LaserWriter, after all...
- We don't provide a preview image for the EPS, which makes it harder to actually *use* the EPS files in something like a word processor.
Has anyone done any work with the Postscript output recently?
Thanks, Ned