CONTENTS Title Page Copyright Page Preface Part I Overview 1 Overview of the Display PostScript System on DECwindows 1.1 Display PostScript System Capabilities 1.2 The DECwindows Implementation of the Display PostScript System 1.2.1 PostScript Interpreter 1.2.2 PostScript Language Extensions for the Display PostScript System 1.2.3 Client Library 1.2.4 pswrap Translation Program 1.2.5 Display PostScript System Extensions to DECwindows 1.3 Documentation Supporting the Display PostScript System 2 Programming Facilities of the Display PostScript System 2.1 Setting Up Your System 2.2 Initialization 2.3 Creating Contexts 2.3.1 Overview of Contexts 2.3.2 Creating a Context 2.3.2.1 Creating a Simple Context 2.3.2.2 Creating Customized Contexts 2.3.3 Specifying Colors for Contexts 2.3.4 Forked Contexts 2.3.5 Assessing Context Status 2.3.6 Zombie Contexts 2.4 The Coordinate Systems in X and the PostScript Imaging Model 2.4.1 Using the Coordinate Systems 2.4.2 Converting Coordinate Systems 2.4.3 Examples of Converting Coordinates 2.5 Clipping and Repainting Windows 2.6 Resizing the Window 2.7 Mixing Display PostScript and X Rendering 2.8 User Object Indices 2.9 Encodings 2.10 Buffers 2.11 Sharing Resources 2.12 Status Events 2.13 Synchronization 2.13.1 Waiting 2.13.2 Freezing 2.14 Errors and Error Codes 2.15 Termination 3 Programming Tips 3.1 Sample Display Program Part II Reference 4 Data Structures and Data Constants 4.1 Data Structures 4.1.1 DPSContextRec Data Structure 4.1.2 XStandardColormap Data Structure 4.2 Data Constants 4.3 Types and Global Variables 5 Procedures and Operators CHANGE ENCODING (DPS) clientsync (operator) CONTEXT FROM CONTEXT ID (DPS) CONTEXT FROM SHARED ID (XDPS) CONTEXT FROM XID (XDPS) CREATE CONTEXT (XDPS) CREATE SIMPLE CONTEXT (XDPS) CREATE TEXT CONTEXT (DPS) currentXgcdrawable (operator) currentXgcdrawablecolor (operator) currentXoffset (operator) DEFAULT TEXT BACKSTOP (DPS) DESTROY CONTEXT (DPS) DESTROY SPACE (DPS) FIND CONTEXT (XDPS) GET CONTEXT STATUS (XDPS) NEW USER OBJECT INDEX (DPS) REGISTER STATUS PROC (XDPS) SET STATUS MASK (XDPS) setXgcdrawable (operator) setXgcdrawablecolor (operator) setXoffset (operator) setXrgbactual (operator) SPACE FROM SHARED ID (XDPS) SPACE FROM XID (XDPS) UNFREEZE CONTEXT (XDPS) XID FROM CONTEXT (XDPS) XID FROM SPACE (XDPS) A VAX Format for Client Library Procedures A.1 Client Library Procedures-VAX Format A.2 Client Library Single-Operator Procedures-VAX Format EXAMPLES 2-1 Setting Up a Standard Colormap 2-2 Example of Implementing a User Object Index 3-1 PSclock Program to Display a Clock 3-2 Clock Program to Draw a Clock 3-3 Wraps for the Clock Program FIGURES 1-1 VMS DECwindows Implementation of the Display PostScript System 2-1 X Coordinate System 2-2 Coordinate System in the PostScript Imaging Model 2-3 Transformation from User Space to Device Space 2-4 Window Origin and Device-Space Origin 2-5 Example of User-Space Origin in an X Coordinate System 2-6 Effect of Northwest Bit Gravity 2-7 Effect of Southwest Bit Gravity TABLES 1-1 Display PostScript System Documentation Summary 2-1 How Bit Gravity Affects Offsets 2-2 Default Encoding Values 2-3 Encoding Conversions 4-1 Standard Colormap Data Structure-Field Description A-1 DPS Client Library Procedures-VAX Format A-2 Single-Operator Procedures