Re: colormaps and cursors

Petasis Gewrgios (ph1566@rea.edu.physics.uch.gr)
Sat, 30 Nov 1996 12:56:33 -0600 (CST)

To subscribers of the xforms list from Petasis Gewrgios <ph1566@rea.edu.physics.uch.gr> :

spl wrote ...
> [colormap problem]
> > fl_free_colors(k,80), before i change them again with
> > fl_map_color... Am i doing anything wrong??? ...
>
> I don't see any reason to free the colors. You can just change them
> with fl_mapcolor() on the fly. I whipped up a little test program
> where I changed colors thousands of times and didn't have a problem
> just calling fl_mapcolor() without doing the fl_free_colors() [though,
> to be completely honest, I'm not sure why you're having a problem if
> you're not disarranging the 'k' array in some manner.
>

I have the following remark ( maybe usefull...)
May the cause of all these, (color flashes, abnormal change of colors etc)
was the fact that i have an image as a background (root window) ...
when i remove it, everything work ok. It seems that this strange behaviour
begins when forms have few sells to allocate ... I believe that the root of
the problem was that i displayed simultanously about 80 colors, but forms
couldn't allocate more than about 60. Am i wright ?? Is that the cause of
changing allready allocated colors (even FL_BLACK for example..)?
Finally a request:
It would be nice if there was a forms function to return the empty color
sells, so somebody who wants to allocate many colors, to know where to
stop, before all these happen...
Thanks a lot !!!
g.p.
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuf2.usuhs.mil or see
http://bob.usuf2.usuhs.mil/mailserv/xforms.html