Digital PDFs
Documents
Guest
Register
Log In
AA-PAN7A-TE
October 1989
19 pages
Original
0.6MB
view
download
Document:
ULTRIX Worksystem Software Display PostScript® Perspective for Software Developers
Order Number:
AA-PAN7A-TE
Revision:
000
Pages:
19
Original Filename:
OCR Text
VL TRIX W orksystem Software Display PostScript® Perspective for Software Developers Order Number: AA- PAN7 A - TE Perspective for Software Developers Order No. AA-PAN7A-TE ADOBE SYSTEMS INCORPORATED Perspective for Software Developers Writer: Amy Davidson October 25, 1989 Copyright © 1988, 1989 Adobe Systems Incorporated. All rights reserved. POSTSCRIPT and DISPLAY POSTSCRIPT are registered trademarks of Adobe Systems Incorporated. X and X Window System are trademarks of the Massachusetts Institute of Technology. The information in this document is furnished for informational use only, is subject to change without notice, and should not be construed as a commitment by Adobe Systems Incorporated. Adobe Systems Incorporated assumes no responsibility or liability for any errors or inaccuracies that may appear in this document. The software described in this document is furnished under license and may only be used or copied in accordance with the terms of such license. No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, recording, or otherwise, without the prior written permission of Adobe Systems Incorporated. This document replaces the previous version dated October 10, 1988. :mf"lTcnts 1 2 3 4 5 6 About This Document 1 About the DISPLAY POSTSCRIPT System Application Building Blocks 2 Using pswrap 3 The Client Library Interface 5 Manuals for Application Developers 5 Index 9 iii iv Figure 1: The DISPLAY POSTSCRIPT System 2 Figure 2: Creating a DISPLAY POSTSCRIPT Application 4 v 1 ABOUT THIS DOCUMENT This document is your introduction to application development using the text and graphics imaging resources of the DISPLAY POSTSCRIPT@ system. This introduction for the application programmer describes: • The DISPLAY POSTSCRIPT system environment you'll be interacting with. • The Client Library interface you'll be programming for. o The use of the pswrap translator to prepare C-callable procedures containing POSTSCRIPT@ language programs. • The manuals you'll need. 2 ABOUT THE DISPLAY POSTSCRIPT SYSTEM The DISPLAY POSTSCRIPT system provides a device-independent imaging model for displaying information on a screen. This imaging model is fully compatible with the imaging model used in POSTSCRIPT printers. By allowing you to use the POSTSCRIPT language to display text, graphics, and sampled images, it frees you from display-specific details such as screen resolution and number of available colors. You can look at the DISPLAY POSTSCRIPT system as part of the window system. Your application will use window system features for window placement and sizing, menu creation, and event handling, while using DISPLAY POSTSCRIPT features to take care of imaging inside the window. DISPLAY POSTSCRIPT system components include the Client Library, the POSTSCRIPT interpreter, and the pswrap translator. These components are described in the accompanying set of manuals. If you are a new POSTSCRIPT language programmer, you'll also need copies of the POSTSCRIPT language manuals. See Section 6 for a discussion of documentation required by application developers. Figure 1 shows the relationship between your application and the 2 ABOUT THE DISPLAY POSTSCRIPT SYSTEM DISPLAY POSTSCRIPT system. The Client Library contains data structures and procedures your application will use to send requests to the POSTSCRIPT interpreter. No matter what operating system you're dealing with, you can send POSTSCRIPT language programs to the interpreter in the same way, using the same procedure calls. Therefore portability issues are minimized if you're developing an application for more than one environment. Figure 1 The DISPLA Y POSTSCRIPT System Application r Window t il1 L ••••••• ~ I{ PostScript Language I> P" / r 1)< Itl ". x,> .',.,., '>':; <.< :> < .. ,. '" Display ~ P" IttI~ ,}\;:I Ii) (> \» i ... System ..... Data & Events ... ..... ... ~ \.. \·"·< I H Keyboard ..... ..... Mouse I I Operating System 3 APPLICATION BUILDING BLOCKS Most of your application will be written in C or another highlevel languge. You'll call Client Library procedures to start a POSTSCRIPT execution context, send programs and data to the POSTSCRIPT interpreter, and get results from the the interpreter. The Client Library is the application's primary interface to the DISPLAY POSTSCRIPT system. In addition, you'll call wraps POSTSCRIPT language procedures developed specifically for your application. Wraps, short for wrapped procedures, are created by the pswrap translator from POSTSCRIPT language programs written to meet application needs. Figure 2 on page 4 shows how an application program is built. 2 Perspective for Software Developers 4 USING PSWRAP Your application will perform calculations, communicate with the window system, read and write files, and do other application processing in C or another high-level language. It will perform imaging tasks by calling wrapped procedures to send POSTSCRIPT language programs to the interpreter. The pswrap translator creates these wraps from POSTSCRIPT language input. Figure 2 shows how an application is built of C source code and POSTSCRIPT language code translated into C-callable procedures by pswrap. 4 USING PSWRAP 3 Figure 2 Creating a DISPLAY POSTSCRIPT Application pswrap Translator COMPILE Display PostScript Client Library LINK Application Consider a wrap, PWDisplayText, that places text on the screen at a particular x,y coordinate. A call to PWDisplayText from the application program might look something like this: PWDisplayText(72.0, 100.0, "Hello World"); The body of the PWDisplayText procedure, is actually written in the POSTSCRIPT language. It was defined to pswrap as follows: 4 Perspective for Software Developers defineps PWDisplayText(f1oat X,V; char *text) X Y moveto (text) show endps In the wrap definition, the 'defineps' and 'endps' keywords tell pswrap where a given POSTSCRIPT language program begins and ends. The 'defineps' statement defines the resulting procedure call. The pswrap translator processes this input and produces a C language source-code file. When compiled and linked with the application, the PWDisplayText procedure sends a POSTSCRIPT language program to the interpreter (binary-encoded for more efficient processing), causing the specified text to be displayed. To summarize, pswrap takes a POSTSCRIPT language program as input and gives you back a C language program. After you compile the resulting C program and link it into your application, calling the wrap will transmit a stream of POSTSCRIPT language binary objects to the interpreter. 5 THE CLIENT LIBRARY INTERFACE The Client Library is a linkable library of compiled C procedures that provides an interface between the application and the DISPLAY POSTSCRIPT system. It creates an environment for handling imaging calls to specific Client Library procedures like DPSmoveto and custom wraps written for the application. The Client Library is tailored by the DISPLAY POSTSCRIPT system vendor for your particular operating environment. The Client Library Reference Manual describes a generic interface; your system vendor may add additional features or slightly modify the interface to suit your hardware and software. See your vendor's system-specific documentation for details. 6 MANUALS FOR APPLICATION DEVELOPERS The accompanying set of manuals contains information needed by a POSTSCRIPT programmer developing an application for the DISPLAY POSTSCRIPT system. If you're new to the POSTSCRIPT language, you should first read the following manuals (published 6 MANUALS FOR APPLICATION DEVELOPERS 5 for Adobe by Addison-Wesley and available by calling 1-800-344-8335 or through your technical bookstore): POSTSCRIPT Language Reference Manual The standard reference for the POSTSCRIPT language. Describes the POSTSCRIPT imaging model and the concepts and facilities of the POSTSCRIPT interpreter. Documents the POSTSCRIPT language. Required reading. POSTSCRIPT Language Tutorial and Cookbook Provides an infonnal, interactive introduction to the POSTSCRIPT language and a collection of programs that offer examples of POSTSCRIPT usage. POSTSCRIPT Language Program Design Gives guidelines for designing and debugging POSTSCRIPT language programs. Printeroriented, but some of the infonnation is relevant to writing for a DISPLAY POSTSCRIPT application. Once you're up to speed in the POSTSCRIPT language, read the following manuals: POSTSCRIPT Language Extensions for the DISPLAY POSTSCRIPT System Describes the extensions to the POSTSCRIPT language that were made for the DISPLA Y POSTSCRIPT system, such as alternative POSTSCRIPT language encodings, multiple execution contexts, user paths, window system support, and memory management. Introduces important system concepts and documents additional POSTSCRIPT operators. Client Library Reference Manual Describes the procedural interface to the DISPLA Y POSTSCRIPT system. Tells how to send programs and data to a POSTSCRIPT execution context, how to handle context output, how to create and tenninate a context. Contains procedure definitions, programming tips, and a sample application program. 6 Perspective for Software Developers pswrap Reference Manual Describes how to define C-callable procedures that contain POSTSCRIPT language programs. Tells how to declare input arguments and output to be received from the interpreter. Documents the pswrap command line options. POSTSCRIPT Language Color Extensions Describes color extensions to the POSTSCRIPT language, including multiple color images, color halftone screen definitions, color correction, and CMYK color specification. Because of the nature of DISPLAY POSTSCRIPT, some of the information you need to write programs is necessarily systemspecific. Therefore, in addition to the manuals listed above, you'll need to consult the documentation provided by your system software vendor. The following system-specific documentation is available from Adobe: X Window System Programmer's Supplement to the Client Library Reference Manual Describes information about the Client Library interface that is specific to the X Window System™, such as context creation and additional error codes. 6 MANUALS FOR APPLICATION DEVELOPERS 7 ex Client Library 5 device independence Display PostScript components DPSmoveto 5 imaging modell, 6 manuals 5 portability 2 PostScript imaging modell, 6 pswrap translator 3 PWDisplayText 4 window system wraps 2,3 9 How to Order Additional Documentation Technical Support If you need help deciding which documentation best meets your needs, call SOO-343-4040 before placing your electronic, telephone, or direct mail order. Electronic Orders To place an order at the Electronic Store, dial SOO-DEC-DEMO (SOO-332-3366) using a 1200- or 2400-baud modem. If you need assistance using the Electronic Store, call SOO-DIGITAL (SOO-344-4S25). Telephone and Direct Mail Orders Your Location Call Contact Continental USA, Alaska, or Hawaii SOO-DIGITAL Digital Equipment Corporation P.O. Box CS200S Nashua, New Hampshire 03061 Puerto Rico S09-754-7575 Local DIGITAL subsidiary Canada SOO-267-6215 Digital Equipment of Canada Attn: DECdirect Operations KA02j2 P.O. Box 13000 100 Herzberg Road Kanata, Ontario, Canada K2K 2A6 In terna tional Internal) Local DIGITAL subsidiary or approved distributor SOC Order Processing - WMO jE 15 or Software Distribution Center Digital Equipment Corporation Westminster, Massachusetts 01473 ) For internal orders, you must submit an Internal Software Order Form (EN-01740-07).
Home
Privacy and Data
Site structure and layout ©2025 Majenko Technologies