Display PostScript graphics questions

Steve Marsden stevem at ibmpcug.co.uk
Sat Sep 1 04:25:14 AEST 1990


Greetings!

I am currently investigating the use of PostScript as a standard
vehicle for a business graphics application running under AIX 3.1
on the RS/6000 series.  Specifically, I'm looking at using the
AIXwindows Display PostScript (DPS) for the graphics display and
manipulation within a Motif application framework.  The intention
would be to also use PostScript as the hard-copy intermediate
language, and to export Encapsulated PostScript for use by other
applications.

So far, I have done some prototyping of a simple application,
using the Motif toolkit to build menus etc, and having a main
DrawingArea widget, into whose window the DPS is drawn.  Most of
the stuff I want to do is okay, but I have now got some questions
that I hope someone out there will be able to help me with.

1) Dynamic drawing

In the past, when I have wanted to do a dynamic dragging operation,
I have used XOR mode graphics to draw the object being dragged
over the background, and then undraw it again, leaving the
background as it was.  As far as I can tell, this is not possible
using DPS, as it adheres to the opaque painting model. 
How do I do this kind of operation using DPS?
If I can't do it using DPS, do I resort to Xlib for this case,
drawing into the same window with an XOR GContext?

2) Expose/Redraw

What I would really like is for the picture in my window to be
redrawn when the window gets exposed, without requiring the
intervention of my application.
Is there any way I can do this?

3) Input Correlation

When the user wishes to select an object from the window display,
my application has to determine which object it is that coincides
with the point selected.  It seems from the documentation that the
inufill/inustroke etc operators should be used to do this - is this
the case?

4) PostScript language output

I am currently using the DPS client library to do my DPS output.
Is there a way to get hold of the PostScript language text that
is equivalent to the series of client library function calls that
I'm doing?  To explain further, take a simple piece of code that
does this:
        DPSmoveto(ctxt, 100.0, 200.0);
        DPSlineto(ctxt, 500.0, 500.0);
        DPSstroke(ctxt);
is there any way to re-execute this code and capture a set of
PostScript operators in string form, such as:
        100.0 200.0 moveto 500.0 500.0 lineto stroke
which I could then send to a PostScript printer?

Thanks in advance for your help.
Steve Marsden - really working for Logica UK Ltd, London, England.
-- 
Automatic Disclaimer:
The views expressed above are those of the author alone and may not
represent the views of the IBM PC User Group.
-- 



More information about the Comp.unix.aix mailing list