luser- -droog
unread,Nov 30, 2013, 11:32:04 PM11/30/13You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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.