Article View: comp.lang.postscript
Article #2355Calculating bounding box information (bb.ps)
From: Frank Jensen
Date: Mon, 11 Jun 1990 00:39
Date: Mon, 11 Jun 1990 00:39
30 lines
1377 bytes
1377 bytes
I have just tried to use the `bb.ps' code. It is supposed to
keep track of bounding box information while it draws the figure.
This sounds to be difficult in general: it is hard to keep track of
something being drawn and then - maybe partially - erased later. So,
sometimes you will get a bounding box that is too large.
But I didn't expect to get a too small bounding box!
I then looked at the code, and I found that the code (a least the
version I have) do not save changes made to the bounding box between
save/restore pairs. I therefore added the following lines to the code:
/-restore /restore load def
/restore
{ bb-llx bb-lly bb-urx bb-ury
5 -1 roll
-restore
/bb-ury xstore /bb-urx xstore
/bb-lly xstore /bb-llx xstore
} def
This code ensures that the bounding box information is preserved when
VM is restored to a previous snapshot.
Frank Jensen
Department of Computer Science
State University of New York at Stony Brook
Technical Details
Message-ID:
<10024@sbcs.sunysb.edu>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!tut.cis.ohio-state.edu!husc6!cmcl2!sbcs!sbstark!fjensenShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!tut.cis.ohio-state.edu!husc6!cmcl2!sbcs!sbstark!fjensen From: fjensen@sbstark.cs.sunysb.edu (Frank Jensen) Newsgroups: comp.lang.postscript Subject: Calculating bounding box information (bb.ps) Message-ID: <10024@sbcs.sunysb.edu> Date: 11 Jun 90 00:39:39 GMT Sender: news@sbcs.sunysb.edu Organization: State University of New York at Stony Brook Lines: 30