Content deleted Content added
m →Design |
m →Design |
||
Line 9:
== Design ==
The original PostScript was written for printing, with the model being that only one document could be printed at one time, and that the document was broken into logical sections approximating a page. For this reason, the underlying model of PS was based on a [[stack machine]] similar to the [[Forth programming language]], which reduced the complexity of the
In contrast, a display engine works in a very different environment. There is no analog of a {{code|showpage}} that will eventually allow queued instructions to be performed, generally any drawing is expected to take place immediately. Moreover, whereas a PS printer could only print one document at a time, in a modern computer with multiple display [[Window (computing)|window]]s, all of the windows could be updating at the same times using different settings. This was addressed with the introduction of ''multiple execution contexts'', each of which approximated the model seen on a printer; that is, each window effectively had its own PS context and instruction stack, and each window could then produce output with different settings, like whether or not the next line should be dashed or solid.The DPS system provided library calls to create the contexts, which could be completely independent or shared.{{sfn|Adobe|1990|p=326}} Shared contexts were useful in windowing systems because they allowed all of the windows within an application, or even across multiple applications, to share settings and especially pre-defined procedures stored in the {{code|userdict}} and {{code|globaldict}}. One particularly important use of the shared {{code|globaldict}} was to store system-wide fonts.{{sfn|Adobe|1990|p=327}}
|