Re: XForms: Wrong colors on Solaris

Steve Lamont (spl@szechuan.ucsd.edu)
Wed, 14 Jan 98 12:21:07 PST

To subscribers of the xforms list from spl@szechuan.ucsd.edu (Steve Lamont) :

> In my app, from the fl_state it appears on my Linux machine the
> Visual class is TrueColor with a colormap of 33 and a depth of 15.
> On the Sun, the visual class is PseudoColor with the same colormap
> and a depth of 8. This, I assume, is reading the setup of the X
> server for my video card/monitor combo.

Well, not exactly. XForms tries to figure out the "best" Visual class
and use that when it starts up.

> Most of my drawing is with Xlib functions. I set the foreground and
> background for the GC using FL_COLORs and then draw lines/text or
> copy a pixmap. I'm also using a GXxor drawing mode. XForms objects
> do not change color. There is no color flashing.

Are you converting the FL_COLOR to a pixel value using fl_get_pixel()?

> I can change the X settings on the Linux machine to visual
> PseudoColor and depth 8 to match Sun, but the Sun is my target
> machine and I don't know how to change its X settings. I don't
> understand why an FL_COLOR displays differently on each machine no
> matter what the Visual class is. I.E. both pseudocolor and
> truecolor should display a FL_RED as red, shouldn't they?

Remember that the XForms color map is *not* the same as the X
Colormap and, of course, the colormap's entries will not necessarily
be the same from machine to machine.

spl

_________________________________________________
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://bloch.phys.uwm.edu/xforms
List Archive: http://bob.usuf2.usuhs.mil/mailserv/list-archives/