Re: XForms: Drawing to a pixmap

Scott F. Thompson (sthompson@alanpenn.com)
Wed, 17 Nov 1999 12:07:35 -0500 (EST)

# To subscribers of the xforms list from "Scott F. Thompson" <sthompson@alanpenn.com> :

On Wed, 17 Nov 1999, Steve Lamont wrote:

> # To subscribers of the xforms list from spl@szechuan.ucsd.edu (Steve Lamont) :
>
> > I am porting my xforms application to an SGI box, and I'm getting the
> > following runtime error:
> >
> > X Error of failed request: BadMatch (invalid parameter attributes)
> > [snip]
> > This is caused by trying to draw to a pixmap that I've created (for double
> > buffering purposes). A few facts:
> >
> > - The code works fine on Linux (Red Hat 6.0).
> > - It bombs on 2 different SGI machines (Indigo2 Impact R10k, Irix 6.2).
> > - Without creating/writing to pixmaps, my xforms app ports fine.
> > - I've written a small X program and can create/write to pixmaps
> > without any problems on the same SGI machines. It's when I try to
> > do it from within an xforms app that causes problems.
>
> My guess is that the Pixmap was created with a different Visual than
> the form. How is the Pixmap created?

I've discovered that it's a depth issue. DefaultDepth () returns 8, but
fl_state[fl_get_vclass()].depth returns 24. When I use the latter to
create the pixmap, the code works!

So, I guess I should be using the fl_state array instead of X's
DefaultDepth function to create pixmaps when using xforms.

Thanks for the response.

-Scott

_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuhs.mil or see
http://bob.usuhs.mil/mailserv/xforms.html
XForms Home Page: http://bragg.phys.uwm.edu/xforms
List Archive: http://bob.usuhs.mil/mailserv/list-archives/