🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: adobe.postscript.programming
3 messages
3 total messages Started by Alex_Cherepanov Thu, 28 Dec 2006 05:21
Unexpected interaction of gsave and setbbox
#442
Author: Alex_Cherepanov
Date: Thu, 28 Dec 2006 05:21
9 lines
1153 bytes
The following program runs on Distiller 5 (and likely on other Adobe 
interpreters) with gsave but fails without it. Does anybody have any
insights into the possible cause of this undocumented feature?

/Helvetica 5 selectfont
10 10 moveto
gsave % fails on Distiller 5 without gsave
10 10 15 15 setbbox
(ugu) show showpage
Re: Unexpected interaction of gsave and setbbox
#443
Author: Helge_Blischke
Date: Fri, 29 Dec 2006 14:14
10 lines
1294 bytes
I guess that it succeeds with the presence of the gsave is a bug.

According to the definition of setbbox, the current path (even under construction) must fit completely into the interior of the rectangle defined by the setbbox operator.

If you replace the "10 10 15 15 setbbox" by, e.g.
"0.1 setlinewidth 0 setlinejoin 10 10 5 5 rectstroke",
you will see that the "ugu" string exceeds the rectangle (the lower part of
the gand the complete second u). Thus, failing (causing a rangecheck error) is the expected and correct behaviour.

Helge
Re: Unexpected interaction of gsave and setbbox
#444
Author: Alex_Cherepanov
Date: Sat, 30 Dec 2006 12:45
17 lines
1543 bytes
Helge_Blischke@adobeforums.com wrote:

> I guess that it succeeds with the presence of the gsave is a bug.
I know that the observed behavior is not compatible with PLRM3.
However, experience shows that quite often PDF spec is patched to
match the implementation. PLRM is updated less often - perhaps this
feature is not yet documented.

I'd like to hear that this bug is scheduled to be fixed
in PostScript 4 products.

Or Adobe products now document a wonderful feature, that the
path bounding box sets only the minimum bounding box when the
path construction starts on a different gsave level.

Regards,
Alex
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads