PostScript: Perbezaan antara semakan

Kandungan dihapus Kandungan ditambah
Baris 49:
 
Once the ''[[de facto]]'' standard for electronic distribution of final documents meant for publication, PostScript is steadily being supplanted in this area by one of its own descendants, the Portable Document Format or [[Portable Document Format|PDF]]. By 2001 there were fewer printer models which came with support for PostScript, largely due to the growing competition from much cheaper non-PostScript ink jet printers, and new software-based methods to render PostScript images on the computer, making them suitable for any printer (PDF provided one such method). The use of a PostScript laser printer still can, however, significantly reduce the CPU workload involved in printing documents, transferring the work of rendering PostScript images from the computer to the printer. PS is still an option on most "high end" models.
 
== Use as a display system ==
{{main|Display PostScript}}
{{main|NeWS}}
 
PostScript became commercially successful due to the introduction of the [[graphical user interface]], allowing designers to directly lay out pages for eventual output on laser printers. However, the GUI's own graphics systems were generally much less sophisticated than PostScript; Apple's [[QuickDraw]], for instance, supported only basic lines and arcs, not the complex [[B-spline]]s and advanced region filling options of PostScript. In order to take full advantage of PostScript printing, applications on the computers had to re-implement those features using the host platform's own graphics system. This led to numerous issues where the on-screen layout would not exactly match the printed output, due to differences in the implementation of these features.
 
As computer power grew, it became possible to host the PS system in the computer rather than the printer. This led to the natural evolution of PS from a printing system to one that could also be used as the host's own graphics language. There were numerous advantages to this approach; not only did it help eliminate the possibility of different output on screen and printer, but it also provided a powerful graphics system for the computer, and allowed the printers to be "dumb" at a time when the cost of the laser engines was falling. In a production setting, using PostScript as a display system meant that the host computer could render low-resolution to the screen, higher resolution to the printer, or simply send the PS code to a smart printer for offboard printing.
 
However, PostScript was written with printing in mind, and had numerous features that made it unsuitable for direct use in an interactive display system. In particular, PS was based on the idea of collecting up PS commands until the <code>showpage</code> command was seen, at which point all of the commands read up to that point were interpreted and output. In an interactive system this was clearly not appropriate. Nor did PS have any sort of interactivity built in, supporting hit detection for mouse interactivity obviously did not apply when it was being used on a printer.
 
When [[Steve Jobs]] left Apple and started [[NeXT]], he pitched Adobe (a company he had much to do with creating) on the idea of using PS as the display system for his new workstation computers. The result was [[Display PostScript]], or DPS. DPS added basic functionality to improve performance by changing many string lookups into 32 bit integers, adding support for direct output with every command, and adding functions to allow the GUI to inspect the diagram. Additionally, a set of "bindings" was provided to allow PS code to be called directly from the [[C programming language]]. NeXT used these bindings in their [[NeXTStep]] system to provide an [[object oriented]] graphics system. Although DPS was written in conjunction with NeXT, Adobe sold it commercially and it was a common feature of most [[Unix workstation]]s in the 1990s.
 
[[Sun Microsystems]] took another approach, creating [[NeWS]]. Instead of DPS's concept of allowing PS to interact with C programs, NeWS instead extended PS into a language suitable for running the entire GUI of a computer. Sun added a number of new commands for timers, mouse control, interrupts and other systems needed for interactivity, and added [[data structure]]s and language elements to allow it to be completely object oriented internally. A complete GUI, three in fact, were written in NeWS and provided for a time on their workstations. However, the ongoing efforts to standardize the [[X11]] system led to its introduction and widespread use on Sun systems, and NeWS never became widely used.
 
== The language ==