Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.postscript > #1742

the interaction of gsave/grestore and save/restore

Newsgroups comp.lang.postscript
Date 2013-11-30 20:32 -0800
Message-ID <0fbc5930-1953-445a-b297-d8cb5c6e53bb@googlegroups.com> (permalink)
Subject the interaction of gsave/grestore and save/restore
From luser- -droog <mijoryx@yahoo.com>

Show all headers | View raw


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.

Back to comp.lang.postscript | Previous | Next | Find similar | Unroll thread


Thread

the interaction of gsave/grestore and save/restore luser- -droog <mijoryx@yahoo.com> - 2013-11-30 20:32 -0800

csiph-web