> To subscribers of the xforms list from spl@szechuan.ucsd.edu (Steve Lamont)
:
>
> > It looks to me as if XForms is calling XFreeColormap() for colormaps
> > assigned to canvases with fl_set_canvas_colormap(). Is that what's going
> > on? I would think that if I hand a canvas a colormap, then it should be
my
> > responsibility to free it, and XForms should leave it alone.
>
> Are you using the gl.c supplied with XForms? There are some
> strangenesses in it that, as I recall.
I'm not using any gl at all. I'm doing everything with Xlib calls.
>
> Regarding using the default Colormap, it might not be as bad as you
> think. XForms doesn't reserve that many colors and most of them are
> pretty common, so, if you're aggressive about optimization, you can
> use almost the entire map.
Well, I can be using hundreds of colors in each canvas, and can have
more than one canvas showing at a time, so I'm forced to use separate
colormaps for each one. (The application is using a color scale to show the
stresses and strains in a material, and the user specifies how
many colors to use. For some samples it's necessary to use a lot of
colors to get a smooth display.) I could just demand that the program
be run only in 24-bit TrueColor, but I'd rather not do that.
>
> When I get back on Monday, I can share some code which might be useful
> in doing colormap management.
>
That would be great. But I still think that XForms is doing something
wrong by freeing the Colormap that I've given it. Can you confirm that
that's what it's doing? Or am I doing something wrong in the example
I included with my first message? If it's an XForms bug that will be
fixed soon (or has been already, since I'm using an old version), then
I won't bother with a work-around, I'll stick with 24-bit displays until
we upgrade our version of XForms.
Thanks,
Steve
-- -- EMail: stephen.langer@nist.gov Phone: (301) 975-5423 -- -- WWW: http://math.nist.gov/mcsd/Staff/SLanger/ Fax: (301) 990-4127 -- -- Mail: Building 820 Room 365; NIST; Gaithersburg, Md 20899-0001 -- _________________________________________________ To unsubscribe, send the message "unsubscribe" to xforms-request@bob.usuf2.usuhs.mil or see http://bob.usuf2.usuhs.mil/mailserv/xforms.html Xforms Home Page: http://bragg.phys.uwm.edu/xforms List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/