Display PostScript: Difference between revisions

Content deleted Content added
No edit summary
Line 3:
Display PostScript is a fairly limited expansion on the original [[PostScript]] language. In order to support interactive, on-screen use with reasonable performance, a few changes were needed:
 
*''multiple execution contexts'': unlike a printer setting where the PS interpreter had only one job at a time, DPS would be used in a number of windows at the same time, each with their own settings (colours, scale, etc.). This required a modification to the system to allow it to keep several "contexts" (sets of data) active, one for each process (window).
 
*''encoding names'': many of the proceedures and data structures in PostScript are looked up by name. In DPS these names could be replaced by small numbers, which are much easier and faster for a computer to find.
 
*''interaction support'': a number of proceedures were defined to handle interaction, including hit detection
 
*''halftone phase'': [[halftone]]s need to be matched to the device they are printed on in order to avoid [[moire pattern]]s. Since the display can be changed on the fly, DPS added the ability for the device to change the halftoning.
 
*''incremental update'': in printing applications the PS code is interpreted until it gets a ''<code>showpage''</code> at which point it is actually printed out. This is not suitable for a display situtuation where you need a large number of minor updates all the time.
 
*''bitmap font support'': DPS added the ability to map PS fonts onto hand-drawn bitmap fonts and change from one to the other on the fly. While PS's ability to display fonts on "low rez" devices was good, "low rez" meant something on the order of 300dpi, not the 72dpi that a screen used. This required hand-built fonts for reasonable output.
 
*''programming language support'': DPS introduced the concept of a "pswrap", which allowed developers to wrap PostScript code into a C language function which could then be called from an application.
 
DPS did not, however, add a windowing system. That was left to the implementation to provide, and DPS was meant to be used in conjunction with an existing windowing engine. This was often the [[X Window System]], and in this form Display PostScript was later adopted by companies such as [[IBM]] and [[SGI]] for their workstations.