Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

the interaction of gsave/grestore and save/restore

25 views
Skip to first unread message

luser- -droog

unread,
Nov 30, 2013, 11:32:04 PM11/30/13
to
Understanding this part of postscript has taken me a rather
long time, so I present a rant and ramble about "what's the diff?"

The graphics state is an object in local VM.

gsave and grestore implement some kind of stack at the ps-level
which creates copies and makes redefinitions to manage a graphics
stack as a postscript abstract data type (probably an array and
index pair defined in a dictionary).

Arrays and Dicts are VM objects.

Therefore save and restore which operate on VM as a whole,
naturally produce the desired effects upon the VM structures that
comprise the graphics state data structure, without any special-cases.
Because it's built out of arrays and dicts, and all arrays and dicts
get reverted by restore.
0 new messages