[comp.sys.hp] Starbase commands on X Pixmaps.

M.C.Collett@lut.ac.uk (M C Collett) (04/12/91)

Why is it that X11 pixmaps cannot be the opened for drawing
using starbase routines?
With X11 Windows you can use make_X11_gopen_string and 
gopen, but for pixmaps this produces a runtime error.
I am presently converting a large program from HP windows
to X11. This program uses a number of starbase calls
which I don't want to have to change.

Mike Collett

stroyan@hpfcso.FC.HP.COM (Mike Stroyan) (04/16/91)

> Why is it that X11 pixmaps cannot be the opened for drawing
> using starbase routines?
> With X11 Windows you can use make_X11_gopen_string and 
> gopen, but for pixmaps this produces a runtime error.
> I am presently converting a large program from HP windows
> to X11. This program uses a number of starbase calls
> which I don't want to have to change.
> 
> Mike Collett
> ----------

The Starbase drivers use Xlib calls like XGetWindowInfo that will not
succeed on pixmaps.  The calls are needed for such things as finding the
window's screen and the resolution of the screen.  That is necessary for
METRIC set_p1_p2 and the inquire_sizes call.  The drivers also try to
find the window's colormap and the contents of the colormap.  That is
required for mapping RGB values to indices.  A pixmap has none of these
qualities, so even if we did a rewrite to special case pixmaps there are
some basic problems with defining the behavior of Starbase in a pixmap.

Perhaps what you are looking for would be something like
make_X11_pixmap_gopen_string(display, window, pixmap), where the window
is used for determining the resolution, visual and colormap qualities
while the pixmap is rendered to.  I'm interested in hearing what would
suit your needs.  I'm sorry to say that with the length of the software
lifecycle and the number of projects competing for engineer time, it
would take over a year at best to put these features into the hands of
customers like yourself.  Still, you might be able to help future
generations.  :-(

Mike Stroyan, mike_stroyan@fc.hp.com