[comp.lang.postscript] What is "Display PostScript"?

misha@ninja.csuohio.edu (Misha Rekhson) (06/14/91)

In <284FEA7D.5A62@deneva.sdd.trw.com> PostScript on Computer Displays
(Summary), Mark R. Thomsen writes:

>Computers that display PostScript as run-time graphics support
>for applications programs:

>  NeXT - Display PostScript (NeXTstep)
>  Sun - NeWS (Open Windows)
>  SGI - NeWS
>  DECstations - Display PostScript (DECwindows)

My questions: what exactly is Display PostScript? Is it a program? A concept?
How does it fit with DECwindows? Where is it available?

What is "run-time graphics support"?

I have a Decstation5000 and have dxpsview (Dec's PostScript previewer), but
I haven't heard of "run-time" system for Decwindows.

Please excuse me if the questions sound naive...

Thank you in advance,

-Misha Rekhson



-- 

Misha Rekhson                       Cleveland State Univeristy, Ohio
misha@ninja.csuohio.edu             (216) 687-5283

thomsen@spf.trw.com (Mark R. Thomsen) (06/15/91)

Misha Rekhson writes
  
  My questions: what exactly is Display PostScript? Is it a program? A concept?
  How does it fit with DECwindows? Where is it available?

Display PostScript is a software program/library from Adobe. A program can  
issue 'wrapped' postscript to it (close to identical to a postscript file) and  
make subroutine calls (to draw piece by piece). Postscript fonts get rasterized  
and handled on the screen.

I asked my original question (which you responded to) because I am pleased with  
DPS on the NeXT and wonder if this will grow in use. The approach seems quite  
sound ... to me.

DEC advertises that it is available for DECwindows.
  
  What is "run-time graphics support"?

Versus writing a file that is later interpreted for display/printing, generate  
graphics in an interactive mode from a running program. That is, a lineto  
should draw on the screen right then.
  
  I have a Decstation5000 and have dxpsview (Dec's PostScript previewer), but
  I haven't heard of "run-time" system for Decwindows.

I cannot claim to be intimate with this. I did confirm that DEC offers it and  
there were several folk here who responded that they use it and it works well  
(if a bit less smooth than NeXT).
  
  Please excuse me if the questions sound naive...

Please excuse me if I have not helped.

davis@3d.enet.dec.com (Peter Davis) (06/17/91)

In article <1991Jun13.213154.1129@ninja.csuohio.edu>, misha@ninja.csuohio.edu (Misha Rekhson) writes...
> 
>I have a Decstation5000 and have dxpsview (Dec's PostScript previewer), but
>I haven't heard of "run-time" system for Decwindows.
>

dxpsview is simply an application that uses Display PostScript to allow you to
view PostScript files on the workstation screen.  The Display PostScript system
itself consists of an X server extension, a client side library, a utility
called pswrap, and various include files, examples, etc.

You can write programs which use Display PostScript functions, and intermingle
Display PostScript calls with Xlib calls, etc.  For example, you could draw a
line by doing something like:

	DPSmoveto (context, x1, y1);
	DPSlineto (context, x2, y2);
	DPSstroke (context);

The Display PostScript context is basically an X drawable (window or pixmap)
which has been set up for DPS output.  You can have as many simultaneous
contexts as your system resources allow, and you can allow them to share virtual
memory, etc.  The above example could also have been coded as:

	DPSprintf (context, "%f %f moveto %f %f lineto stroke\n",
		   x1, y1, x2, y2);

The pswrap utility lets you write whole procedures "in" PostScript, and call
them from your c program.  For example, you could have something like:

wrap_routines.psw:

	defineps PSWmakeLine (DPSContext ctx; float x1, y1, x2, y2)
	x1 y1 moveto
	x2 y2 lineto
	stroke
	endps

Then, in your c program, you simply call:

	PSWmakeline (context, x1, y1, x2, y2);

Simple, eh?