🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #6325

Re: What is "Display PostScript"?

#6325
From: Peter Davis
Date: Mon, 17 Jun 1991 15:15
44 lines
2110 bytes
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?
Technical Details
Message-ID: <1991Jun17.142505.1780@engage.pko.dec.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!decwrl!pa.dec.com!e2big.mko.dec.com!engage!3d.enet.dec.com!davis

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!decwrl!pa.dec.com!e2big.mko.dec.com!engage!3d.enet.dec.com!davis
From: davis@3d.enet.dec.com (Peter Davis)
Newsgroups: comp.lang.postscript
Subject: Re: What is "Display PostScript"?
Message-ID: <1991Jun17.142505.1780@engage.pko.dec.com>
Date: 17 Jun 91 15:15:52 GMT
Sender: newsdaemon@engage.pko.dec.com (USENET News Daemon)
Distribution: usa
Organization: Digital Equipment Corporation
Lines: 44