Re: Only drawing ...

Petasis Gewrgios (
Tue, 10 Dec 1996 15:14:32 +0200 (WET)

To subscribers of the xforms list from Petasis Gewrgios <> :

Hi all,
I want to ask if there is a faster way to allocate colors than
fl_map_color. What i want to do is the following:
I have a rectangular area (a free object) in which i display many
filled rectangulars, each of them having a different color.
I want to draw about 200 such rectangulars, and i use fl_map_color
to allocate the colors. But allocating 200 colors with fl_map_color
takes quite a lot time ( not exactly, about 1-2 sec, but is annoing!).
Is there another way to do thinks faster?
If i create a pixmap in memory and i display it using a pixmap object
will be faster? (Is the internal color manage of pixmap faster than
fl_map_color, or internally uses fl_map_color?)
Is there a way to know some basic things how pixmap objects work internally
so to know the capabilities? ( A pixmap object does use a private colormap
or uses the colormap of the whole form?)

To TC:
I have had some problems with allocating colors, when colormap was almost
full, with wrong "substitutions".You said that it happened because lib
frees colors that souldn't. I also have problems with private colormap
under the same circumstances, where all the colors fl_map_colors return
are black. Is this problem related to the previous one? My app does
this only when i ask for private colormap (using -private in command line).
when using shared colormap works fine (if of course remove the background
image...).All these occur in display with 256 colors. When in hi color
(65.000 something) everything is ok.

To unsubscribe, send the message "unsubscribe" to or see