Display PostScript (or DPS) is a graphical user interface (GUI) system for computers which uses the PostScript (PS) imaging model and language (originally developed for computer printing) to generate on-screen graphics. To the basic PS system, DPS adds a number of features intended to ease working with bitmapped displays and improve performance of some common tasks.
Early versions of PostScript display systems were developed at Adobe Systems. During development of the NeXT computers, NeXT and Adobe collaborated to produce the official DPS system, which was released in 1987. NeXT used DPS throughout its history, while versions from Adobe were popular on Unix workstations for a time during the 1980s and 90s.
Design
In order to support interactive, on-screen use with reasonable performance, changes were needed:
- Multiple execution contexts: Unlike a printer environment where a PS interpreter processes one job at a time, DPS would be used in a number of windows at the same time, each with their own settings (colors, brush settings, scale, etc.). This required a modification to the system to allow it to keep several "contexts" (sets of state data) active, one for each process (window).
- Encoded names: Many of the procedures and data structures in PostScript are looked up by name, string identifier. In DPS these names could be replaced by integers, which are much faster for a computer to find.
- Interaction support: A number of procedures were defined to handle interaction, including hit detection.
- Halftone phase: In order to improve scrolling performance, DPS only drew the small portion of the window that became visible, shifting the rest of the image instead of re-drawing it. However this meant that the halftones might not line up, producing visible lines and boxes in the display of graphics. DPS included additional code to properly handle these cases. Modern full-color displays with no halftones have made this idea mostly obsolete.
- Incremental updates: In printing applications the PS code is interpreted until it gets a
showpage
at which point it is actually printed out. This is not suitable for a display situation where a large number of minor updates are needed all the time. DPS included modes to allow semi-realtime display as the instructions were received from the user programs. - 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 resolution" devices was good, "low resolution" meant something on the order of 300 dpi, not the 96 dpi that a NeXT screen used. This resolution required hand-built bitmap fonts to provide reasonable quality.
- 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. Often the code needed to get from an X window to a DPS context was much more complicated than the entire rest of the DPS interface
. This greatly limited the popularity of DPS when any alternative was available
History
The developers of NeXT wrote a completely new windowing engine to take full advantage of NeXT's object-oriented operating system. A number of commands were added to DPS to actually create the windows and to react to events, similar to but simpler than NeWS. The single API made programming at higher levels much easier and made NeXT one of the few systems to extensively use DPS. The user-space windowing system library Nextstep used PostScript to draw items like titlebars and scrollers. This, in turn, made extensive use of pswrap
s, which were in turn wrapped in objects and presented to the programmer in object form.
Modern derivatives
Apple's Mac OS X operating system uses a central window server (created entirely by Apple) that caches window graphics as PDF, instead of storing and executing PostScript code. A graphics library called Quartz 2D provides PostScript-style imaging using the PDF rendering model (a subset, plus tweaks, of the PostScript model), but this is used by application frameworks—there is no PostScript present in the Mac OS X window server. Apple chose to use this model for a variety of reasons, including the avoidance of high Adobe-imposed licensing fees for DPS, and more efficient support of legacy Carbon and Classic code; QuickDraw-based applications use bitmapped drawing exclusively. Adobe's copyright stipulations for the PDF standard are much less restrictive, granting conditional copyright permission to anyone to use the format in software applications, free of charge.
南来地,北往的,上班的,下岗的,走过路过不要错过!
======================个性签名=====================
之前认为Apple 的iOS 设计的要比 Android 稳定,我错了吗?
下载的许多客户端程序/游戏程序,经常会Crash,是程序写的不好(内存泄漏?刚启动也会吗?)还是iOS本身的不稳定!!!
如果在Android手机中可以简单联接到ddms,就可以查看系统log,很容易看到程序为什么出错,在iPhone中如何得知呢?试试Organizer吧,分析一下Device logs,也许有用.
对于博客园里的网友,不敢称为叫"程序员"的人,你们攻击性太强,看来你们是不会想到我的用意的.园子里有不少人都非常喜欢Jeffrey,是因为它的第一版 框架设计 CLR via C#.
可是从第一版到现在的第三版,没有看到真正底层的东西,内容仅仅是比MSDN文档更丰富一些,可能是我的要求太高了吧.
也就是因为它很多时候会接触到微软开发人员,会经常聊聊某些问题而已,而它又将这些问题反应到书中.也许它就像一个小记者.
它的年龄大我们不多,我的孩子与它小儿子一般大,如果我能向它那样出入微软与它们开发人员长时间交流,不仅仅会牛成它这样.....
可是微软的开发人员不会扔太多时间在它这儿的.所以它会整天追着这个,赶它那个..屁颠个不停吧...
而它的另一版被称为好书的 Windows核心编程,更是没有什么深度可言,仅仅是将windows提供的api,以及内核功能再重申了一遍.
这些书对晋及编程知识是有些贡献的,再说一遍我不是在匾低谁,说说想法而已.