Display PostScript
Display PostScript (DPS) is a 2D graphics engine system developed by Adobe Systems that extends the PostScript page-description language and imaging model—originally designed for high-quality printing—to enable precise rendering of text, images, and graphics directly on computer displays.[1][2] Adobe began developing DPS in 1985, shortly after the introduction of the LaserWriter printer, and released it in 1987, to bridge the gap between print and screen rendering by applying the same device-independent PostScript model to interactive displays.[3] NeXT became the first company to license DPS in September 1987, implementing it in the NeXTSTEP operating system, where it served as the core of the windowing and graphics subsystem, allowing applications to draw using PostScript code interpreted in real-time by a dedicated kernel.[2][3] Key features of DPS include resolution and device independence, ensuring that graphical elements like a 2-inch square or complex typography appear consistently across different displays without requiring application modifications; support for the full Adobe Type Library for professional font rendering; and the ability to manage multiple virtual PostScript contexts for isolated drawing in windows or off-screen pixmaps.[1] It operates through a PostScript interpreter integrated with a client library for application calls and adapters for windowing systems, translating PostScript routines into pixel data while leveraging binary encoding and compositing for performance.[1][2] DPS found primary application in advanced 2D graphics environments, such as icons, user interfaces, and image manipulation on Unix workstations, with later extensions integrating it into the X Window System (X11) through collaborations with companies like Digital Equipment Corporation (DEC).[3] While optimized for high-fidelity output matching print quality, it was less suited for real-time 3D tasks like computer-aided design due to its focus on vector-based, resolution-independent 2D imaging.[2]Overview
Definition and Purpose
Display PostScript (DPS) is a 2D graphics engine that extends the PostScript page-description language to enable real-time rendering of graphics and text on computer screens.[2] Developed by Adobe Systems, it adapts the PostScript imaging model—originally designed for high-resolution printing on devices like laser printers—to bitmap display systems, allowing applications to generate dynamic visual output using the same programmatic descriptions.[4] The primary purpose of DPS is to deliver device-independent graphics, ensuring that visual elements appear consistently across diverse screen resolutions and color capabilities while maintaining fidelity when output to printed media.[2] By leveraging the PostScript model's mathematical precision for paths, fills, and transformations, DPS eliminates discrepancies between on-screen previews and final prints, which was a critical challenge in professional workflows.[5] DPS emerged from Adobe's PostScript technology to meet the demands of desktop publishing in the 1980s, where high-quality, scalable vector-based graphics were essential for tasks like layout design and typography.[5] This extension addressed the limitations of raster-based display systems, providing a unified approach for creating and viewing complex documents in environments requiring professional-grade output.[5] At its core, DPS operates on the principle of treating the computer display as a "soft printer," where a dedicated PostScript interpreter dynamically rasterizes code into screen pixels, mirroring the process used for physical printing.[4] This conceptual framework isolates imaging operations from the underlying operating system, promoting portability and standardization across supported platforms.[2]Key Advantages
Display PostScript (DPS) provides significant device independence by allowing applications to generate graphics using a single set of PostScript instructions that render consistently on both displays and printers without requiring code modifications, thereby simplifying development and ensuring portability across hardware.[6] This approach abstracts away device-specific details, such as resolution or color capabilities, through the PostScript imaging model, which operates in resolution-independent units like points where one inch remains constant regardless of the output medium.[7] The system's high-quality output stems from its reliance on vector-based PostScript graphics, enabling anti-aliased rendering and scalability that produces sharp, resolution-independent visuals superior to the pixel-oriented bitmaps of early X11 systems, which often suffered from jagged edges and limited scalability.[6] By interpreting PostScript code in real-time on the display server, DPS achieves precise control over line art, curves, and fills, delivering professional-grade fidelity that minimizes artifacts even on varying resolutions.[7] DPS facilitates a unified workflow particularly beneficial in creative industries like desktop publishing, where maintaining color accuracy and font rendering across screen previews and final prints is essential for WYSIWYG (What You See Is What You Get) consistency.[8] It supports advanced color compositing and precise typography using the Adobe Type Library, ensuring that hues and glyphs appear identically from digital proofing to printed output, which streamlines production processes and reduces errors in color-managed environments.[8] Furthermore, DPS's extensibility allows for native handling of complex visual operations through PostScript extensions, such as gradients for smooth color transitions and transparency via alpha compositing, enhancing expressiveness without custom rasterization.[8] Developers can leverage wrapped procedures to integrate these features seamlessly into applications, enabling effects like layered overlays and fades that elevate graphical sophistication beyond basic drawing primitives.[6]Design and Architecture
Imaging Model
Display PostScript (DPS) adapts the core PostScript imaging model for real-time screen rendering by employing a stack-based, interpreted programming language that describes graphical elements as a sequence of device-independent drawing operations, including path definitions, fills, clips, and image placements. This model treats the display surface as a virtual page, where graphics are built incrementally through operators that manipulate a current path without immediate rasterization, ensuring consistency with PostScript's print-oriented paradigm while enabling interactive updates. The adaptation maintains full compatibility with the PostScript language, extending it with features like user objects and gstates for efficient display management.[9][10] The coordinate system in DPS is device-independent, defining user space with an origin at the lower-left corner and units of 1/72 inch (72 points per inch), which aligns with standard PostScript print resolution for seamless scaling to display devices. This space is transformed into device space—typically pixel-based with integer coordinates—via the Current Transformation Matrix (CTM), an affine matrix that supports operations such as translation, scaling, and rotation to map user coordinates dynamically to screen resolutions. For instance, the initial CTM aligns user space with the display's lower-left origin, with X increasing to the right and Y upward, and adjustments via operators liketranslate or scale ensure resolution independence without altering the underlying geometry.[9][10]
The rendering pipeline in DPS begins with parsing PostScript code into intermediate display lists or binary object sequences, which represent the accumulated graphics state and operations for efficient re-rendering. These lists then undergo geometric transformations applied through the CTM, such as affine matrices for scaling and rotation, to position and orient elements relative to the viewport. Finally, rasterization converts the transformed paths and fills into bitmapped pixels using scan-conversion algorithms that determine pixel inclusion based on rules like the nonzero winding number for fills, ensuring uniform stroke thickness and anti-aliased edges where supported. This pipeline allows for incremental updates, where only changed portions of the display list are re-rasterized, optimizing performance for dynamic interfaces.[9][10]
Path construction in DPS relies on operators that build subpaths as sequences of straight lines and curves, starting with newpath to initialize and moveto to set the initial point, followed by lineto for straight segments or curveto for cubic Bézier curves that define smooth contours. Paths can be closed with closepath or augmented with arcs via arc and arct, forming complex shapes limited only by interpreter storage capacity. Painting operations then apply these paths: fill and eofill interiorize areas using nonzero winding or even-odd rules, respectively, while stroke outlines them with configurable line width, miter joins, and cap styles (e.g., butt, round, square) to control edge appearance. Color application integrates DeviceRGB for additive screen displays, specifying tints from 0.0 to 1.0 for red, green, and blue components, and CMYK for process colors with direct specification that bypasses automatic black generation and undercolor removal, supported by color space conversions and management for consistent rendering across devices.[9][10]
System Components
The Display PostScript (DPS) system is built around a client-server architecture that separates the execution of PostScript code from the application layer, enabling efficient rendering of graphics on display devices.[11] At its core is the DPS server, a dedicated process that incorporates a PostScript interpreter to execute code and generate output for the screen. This server operates independently, often as an extension to the X Window System server, rendering graphics directly to the display surface or off-screen pixmaps provided by the underlying window system.[12] By handling interpretation and rendering in a separate process, the DPS server allows multiple applications to share the interpreter's resources while isolating their execution environments.[6] In the client-server model, applications interact with the DPS server through a system-independent API, such as the Display PostScript Client Library, which translates high-level commands into PostScript code or binary object sequences sent over a local connection or network.[11] The client library enables developers to create and manage execution contexts—virtual PostScript environments that encapsulate the graphics state, including operators, variables, and imaging parameters—without directly embedding the full PostScript interpreter in each application.[6] Upon receiving these sequences, the server executes them within the specified context, performing rasterization and updating the display accordingly, while returning any results or status information back to the client via tagged data structures.[12] This architecture promotes modularity, as the server can time-slice among multiple contexts to ensure responsive performance across concurrent rendering tasks.[11] Integration with underlying window systems occurs through extensions that bind PostScript contexts to native display primitives, such as X Window System drawables and graphics contexts (GCs).[12] The DPS server hooks into the event loop of the host window system to handle input events and manage window hierarchies, using operators likesetxgcdrawable to associate a PostScript context with an X window or pixmap, thereby directing output to specific screen regions.[6] This allows seamless mixing of PostScript-rendered content with traditional X-based elements in a single display surface, with coordinate transformations ensuring alignment between the PostScript imaging model and the window system's geometry.[11] In implementations without native DPS support, proxy agents like the Adobe NX Agent can intercept client calls and forward them as X protocol requests to a remote server.[12]
Memory management in DPS is designed to support persistent and reusable graphics states, with each context allocated its own private virtual memory (VM) space for local variables, operators, and temporary data, while sharing system-wide resources like fonts through a global VM.[12] Contexts are grouped into spaces—logical containers that can be private or shared—allowing efficient allocation and deallocation of resources; for instance, destroying a space via DPSDestroySpace automatically cleans up all associated contexts and their VM.[6] This approach optimizes redraw operations by preserving graphics states across executions, reducing overhead in interactive applications, and includes mechanisms like DPSvmreclaim for garbage collection to monitor and recover unused memory.[11] Secure contexts further isolate VM to prevent interference, ensuring robust operation in multi-user environments.[12]
History
Development Origins
Display PostScript (DPS) originated as an extension of Adobe Systems' PostScript page description language, initially conceptualized in the early 1980s through foundational work on device-independent imaging models. Adobe co-founder John Warnock, drawing from his earlier research at Xerox PARC, outlined key principles in a 1982 SIGGRAPH paper co-authored with Douglas Wyatt, which described a raster imaging model capable of handling geometric constructs for both printing and potential display applications.[13] This laid the groundwork for adapting PostScript beyond printers to interactive graphics on computer screens, with Adobe beginning prototype explorations in the mid-1980s to enable real-time rendering of vector-based content.[14] In 1986, Adobe entered a pivotal collaboration with NeXT Inc., founded by Steve Jobs, to fully realize DPS as a unified graphics platform for the upcoming NeXT Computer workstation. This partnership involved joint engineering efforts to extend PostScript's capabilities for on-screen display, ensuring consistent imaging between screens and printers—a departure from pixel-based systems. NeXT engineers, including head of engineering Bud Tribble, worked closely with Adobe teams to integrate these extensions into NeXTSTEP, the operating system for the NeXT machine. The collaboration was driven by the need for high-fidelity, scalable graphics in professional workstations, where Adobe's vector-oriented approach promised superior precision over bitmap manipulation methods like Apple's QuickDraw, which Warnock critiqued as producing "bit-mapped images that didn’t look like anything that you would really like to use."[14][5] Key motivations stemmed from the demand for professional-grade tools in academic and business environments, where NeXT aimed to deliver a computing platform superior to existing personal systems. By leveraging PostScript's mathematical descriptions of graphics, DPS enabled dynamic operations like rotation and scaling without loss of quality, contrasting with the limitations of raster-focused alternatives. This partnership not only accelerated DPS's development but also positioned it as Adobe's official technology, with NeXT becoming the first to implement it upon the computer's 1988 launch.[15]Release and Evolution
Display PostScript (DPS) debuted in 1988 as an integral part of the NeXTSTEP 0.8 operating system, serving as the core graphics engine for the newly launched NeXTcube computer workstation. Developed through a collaboration between NeXT and Adobe Systems, DPS enabled high-quality, resolution-independent rendering directly on the display, distinguishing it from traditional bitmap-based graphics systems of the era.[16][17] The technology evolved with the release of NeXTSTEP 1.0 in September 1989, which introduced performance enhancements to DPS, including optimized handling of complex imaging operations and better integration with the operating system's object-oriented framework. In 1990, Adobe Systems published a standalone specification for DPS, allowing broader licensing and implementation beyond NeXT's ecosystem, aligned with the advancements in PostScript Level 2.[18][19] In November 1993, Sun Microsystems integrated DPS into OpenWindows 3.3 for Solaris 2.3, replacing the earlier NeWS windowing system and extending support to SPARC-based workstations for consistent cross-platform graphics rendering. This adoption marked DPS's entry into the Unix workstation market, though full deployment followed in subsequent updates.[20] By the late 1990s, DPS faced decline as alternative imaging models gained prominence; NeXT discontinued active support following its exit from hardware production in 1993, limiting further evolution. After Apple's acquisition of NeXT in 1996, the company replaced DPS with the Quartz imaging system in Mac OS X (released in 2001), primarily to avoid ongoing Adobe licensing fees and address performance issues in modern hardware environments.[21][5]Implementations
NeXT Systems
Display PostScript (DPS) served as the exclusive graphics subsystem in NeXTSTEP, the operating system developed by NeXT Computer, Inc., where it powered the Display Manager responsible for rendering all user interface elements, application graphics, and output to printers. This integration allowed for a unified imaging model, ensuring that visual content appeared identically on screen and in print, a key feature enabled by DPS's adaptation of the PostScript language for real-time display operations. By licensing DPS from Adobe Systems and collaborating on its implementation, NeXT made it the foundational technology for the windowing system, bypassing traditional bitmap manipulation in favor of vector-based PostScript commands for superior typographic fidelity and scalability. The system was specifically optimized for NeXT's hardware, including the original NeXT Computer and NeXTstation workstations powered by Motorola 68040 processors running at 25 MHz or 33 MHz (Turbo models), paired with custom framebuffers designed to support high-resolution grayscale or color displays.[22] These framebuffers facilitated efficient rasterization of PostScript paths, achieving screen rendering that aligned with the 72 points-per-inch standard of the PostScript model to match print quality, despite the physical display resolution of approximately 92 DPI on the 1120x832 monochrome monitor. This hardware-software synergy minimized latency in graphics operations, leveraging the 68040's memory management unit for virtual memory support and custom direct memory access controllers for accelerated blitting, which enhanced performance in PostScript-heavy workloads. Developers interacted with DPS through the Objective-C Application Kit (AppKit), primarily via classes such as NXImage for handling raster images and NXPostScript for generating and managing PostScript streams directly within applications. The NXImage class enabled seamless integration of bitmap data into PostScript contexts, while NXPostScript provided methods to execute PostScript code snippets for custom drawing, allowing programmers to create device-independent graphics that rendered consistently across screens and printers. These APIs extended the standard DPS Client Library with NeXT-specific enhancements, such as event handling for interactive PostScript views, promoting a declarative approach to UI design over imperative pixel manipulation. Notable applications exemplified DPS's utility in NeXTSTEP, particularly in tools requiring precise visual fidelity. Interface Builder, NeXT's flagship development environment, utilized DPS to deliver true WYSIWYG (what-you-see-is-what-you-get) editing of user interfaces, where designers could visually assemble objects using PostScript-based rendering for immediate, print-accurate previews of layouts, fonts, and graphics. Similarly, ports of publishing software like Adobe Illustrator leveraged DPS for streamlined workflows, enabling desktop publishing tasks such as layout composition and color separation directly on NeXT hardware, with PostScript output ensuring compatibility with high-end printers without additional conversion steps.[23]Digital Equipment Corporation
Digital Equipment Corporation (DEC) licensed Display PostScript from Adobe in early 1988 and integrated it into DECwindows as XDPS, an extension to the X Window System. XDPS added a PostScript interpreter to the DECwindows X server, allowing applications to mix X graphics protocols with PostScript imaging for high-quality 2D rendering. It supported multiple execution contexts with shared memory and garbage collection, access to the Adobe Type Library for scalable fonts, and custom operators for enhanced control, such as synchronization with X clients. Designed for VMS and ULTRIX operating systems, XDPS enabled network-transparent PostScript rendering in heterogeneous environments, with optimizations for performance in widgets, text handling, and color management. This implementation was detailed in DEC's technical documentation and provided developers with language bindings, including C, to build advanced graphical applications on DEC workstations.[24]Sun Microsystems Integration
Sun Microsystems adapted Display PostScript (DPS) for its Unix workstations by integrating it as an optional graphics layer atop the X11 window system in OpenWindows 3.0, released in 1991, leveraging Adobe's DPS extension library to enable PostScript-based rendering within the X environment.[25] This integration allowed developers to combine X11's network-transparent protocol with DPS's device-independent imaging model, facilitating high-quality 2D graphics output without fully replacing the existing X infrastructure.[26] Support for DPS was extended to Solaris 2.0 in 1992, where it operated through a dedicated DPS server process known as dpsx, initially available on SPARC architecture and later extended to x86 architectures starting with Solaris 2.1 in 1993, to enhance user interfaces built with the Motif toolkit.[27][28] The dpsx process managed PostScript interpretation in a client-server model, handling multiple execution contexts with shared and private virtual memory spaces to support concurrent applications efficiently.[26] This setup provided seamless access to Adobe Type Library fonts and PostScript operators directly via X protocol extensions, improving consistency between screen display and printed output in Solaris-based workflows.[29] To optimize integration, Sun customized the PostScript interpreter for enhanced compatibility with the X protocol, incorporating hooks that enabled remote display capabilities over networks while maintaining security through isolated contexts.[27] These modifications included streamlined operator calls for efficient client-server communication and support for X-specific PostScript extensions, allowing applications to render complex graphics remotely without significant performance degradation.[26] DPS found practical application in Sun's media tools, such as compositing features for blending transparent images, and in scientific visualization software, where it delivered high-fidelity 2D graphics across multi-monitor configurations on workstations.[26] For instance, tools leveraging DPS enabled precise rendering of vector-based diagrams and image manipulations in networked environments, supporting collaborative scientific computing tasks typical of Sun's SPARC systems.[27]Features and Capabilities
Rendering Techniques
Display PostScript (DPS) employs the PostScript imaging model to generate screen graphics, interpreting PostScript code in an interactive server environment to produce pixel-based output optimized for dynamic displays. The system executes PostScript operators to construct paths, apply fills and strokes, and render text and images, ensuring device-independent rendering that translates to efficient screen updates. This approach allows applications to describe graphics declaratively, with the DPS server handling the rasterization process.[9] Incremental rendering in DPS minimizes computational overhead by updating only modified regions of the display, achieved through diffing and sending partial PostScript command streams rather than full redraws. For animations or changes, applications transmit targeted code snippets to the interpreter, which re-executes relevant portions—such as altered paths or glyphs—leveraging user paths to avoid recomputing unchanged elements. This technique, supported by operators likeupath and ustroke, enables smooth updates by confining rasterization to damaged areas, as determined by the client application's event handling. User paths, which encapsulate path construction and painting instructions, facilitate this by allowing reuse without reinterpreting the entire stream.[9]
Anti-aliasing and dithering enhance visual quality on low-resolution screens by applying PostScript's even-odd and nonzero winding fill rules alongside gray-scale interpolation for edges. Anti-aliasing reduces jagged artifacts through parameters like AntiAlias in shading patterns and setsmoothness for curve interpolation, blending pixels at boundaries to simulate subpixel precision. Dithering approximates continuous tones via halftone screens and supercells, dividing pixels into clusters to expand gray levels up to 1016 on bilevel devices, controlled by operators such as sethalftone and setscreen. These methods ensure smooth edges and gradients without requiring high-bit-depth hardware.[9]
Caching mechanisms in DPS accelerate repeated rendering by storing compiled display lists in server memory, particularly for static elements like fonts and icons. The font cache retains scan-converted glyphs based on font metrics and the current transformation matrix (CTM), managed via setcacheparams, while the user path cache (ucache) holds interpreted paths for quick invocation, optimizing redraws of complex shapes. These caches, whose limits are configurable using operators such as setcacheparams for fonts and setucacheparams for user paths, reduce interpretation time for recurring graphics. Event-driven updates respond to user interactions like window resizes or scrolls by re-executing pertinent PostScript snippets with adjusted coordinates, using graphics state operators (gsave, grestore) to isolate transformations and trigger targeted repaints.[9]
Compositing and Windowing
Display PostScript (DPS) supports alpha blending through extensions to the PostScript language, enabling transparency effects by associating an alpha value with each pixel to represent opacity, where values range from 0 (fully transparent) to 1 (fully opaque).[30] This mechanism pre-multiplies color components by the alpha value in RGB space, allowing partial transparency for blending operations.[30] The key operator for layering isSover, which composites a source image over a destination image according to the formula \text{dst}' = \text{src} \times 1 + \text{dst} \times (1 - \text{srcA}), where \text{srcA} is the source alpha; opaque regions of the source fully replace the destination, while transparent areas reveal the underlying content.[30] These extensions, introduced as part of OpenStep enhancements to DPS, facilitate effects such as shadows or dissolves by rendering images with varying transparency levels.[8]
In the DPS architecture, the window server plays a central role in managing a compositing buffer that assembles graphics from multiple sources into a final display image.[8] Graphics output is clipped to the boundaries of the target window or pixmap, with additional constraints applied via the current PostScript clipping path to prevent overflow.[8] When windows overlap, the server uses compositing operators like Sover or Copy to blend pixels based on alpha values, ensuring proper handling of layered content without artifacts at edges.[30] This buffer-based approach allows efficient repainting during events like scrolling, where only exposed regions are recomposited rather than redrawing entire windows.[8]
DPS maintains z-order through a stack of PostScript contexts, each associated with a specific window or drawable, providing private execution environments that preserve depth ordering for overlapping elements.[8] These contexts enable advanced UI features, such as rendering drop shadows beneath windows or prioritizing modal dialogs by adjusting the stacking sequence during composition.[2] The interpreter schedules execution across this stack in time slices, ensuring that higher-z elements are composited last to appear on top.[8]
Input integration in DPS maps user events, such as mouse movements or keyboard presses, directly to PostScript callbacks via the client library, allowing applications to respond with interactive graphics updates like dragging elements across layered windows.[8] Event masks are specified at context creation, filtering relevant inputs to trigger PostScript procedures that modify the compositing buffer in real time.[8] This tight coupling supports dynamic behaviors, such as highlighting hovered regions or animating transparency changes during user interactions.[2]