ftp.nice.ch/peanuts/GeneralData/Usenet/news/1991/CSNProg-91.tar.gz#/comp-sys-next-programmer/1991/Dec/PostScript-displaying-PS

This is PostScript-displaying-PS in view mode; [Up]


Date: Sun 02-Dec-1991 14:40:09 From: fletcher@socrates.umd.edu (Charles Fletcher) Subject: PostScript-displaying PS Well I have advanced to IB 002, and some beginning DPS. As I understand it there are three ways to display PS to the screen: 1. Use the single command functions such as PSmoveto(x,y) 2. Use pswrap to turn your PS code into a callable C function 3. Use DSPWriteData() to send a PS file to the interpreter to be send to the named context. I have figured out the first two, but I can't quite get 3. Here is my problem and questions-- First, where do I find more docs on "context"? Especially in view of the NeXT (where I only find context in terms of printing.) My problem: Many existing software packages, for example gnuplot, generate PostScript output. It seems that instead of writing this to a file to be previewed, it would be nice (and expedient) to directly display this "file" (using a buffer or NXMap, or other such memory mapping tricks.) Well, the ultimate (and only one I can find) example of this is YAP. Unfortunately, I cannot follow all that is going on (and I would rather not implement what I don't fully understand.) To me and my simplistic view, I would like to to the following--Put a (custom) View in my application, get its Context, and use DPSWriteData(ViewContext,buffer,len) to send (and view) the buffer (ie, PS file). This is not how YAP operates; instead a "cache" is defined (which, as much as I understand it, is basically an unseen window), sets the cache as the Context, then does a PSComposite with the output window. Is all this really necessary, or is it mostly to catch errors? What am I missing here? I would appreciate any help, or directions to references (or other examples)? Thanks, Charlie BTW--what happened to PSRun()?

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Marcel Waldvogel and Netfuture.ch.