On Wed, Nov 06, 2002 at 02:22:41PM -0800, Keith Packard wrote:
> Around 22 o'clock on Nov 6, Olivier Chapuis wrote:
> 
> 
> > But FindBest{Color,Gray} assume that the allocated colors by
> > miBuildRenderColormap are consecutive (which is the case in practice).
> 
> I don't think so; they work on StaticColor/StaticGray visuals as well for 
> which no colors are preallocated.
>

?? With static class the colors are already defined. It is a 3/3/2
standard colormap (StaticColor) and you do not have to allocate or free
the colors. There are consecutive the colormap is full (and the
code is perfect first = 0, last = num_entries-1).

Please Keith listen me. I was troubled by the first / last pixel logic
for dynamic class (but it is clear that there are no pbs as allocation
is consecutive on a fresh colormap in the real world).

I claim "why this first / last logic ?" because it seems to me that in
any case first = 0 and last = nbr of colors that miBuildRenderColormap
minus 1. You say no the allocator can do random things.  Fine. So you
can have (in theory) first = 0 and last = 255 and render want to use
only 71 entries in the cmap. Now take a look at FindBestColor (it
takes a look at undefined entries).

Of course this have some (theoretical) importance for
QueryPictIndexValues (In my patch I've assumed that the allocation is
consecutive). 

> For testing, I added an 'all' 
> mode and discovered to my delight that Gtk+ and Mozilla were both quite 
> happy to run with no free colormap cells -- somehow they discovered the 
> 6x6x6 cube and used it.  Spooky.
>

I think I try to say this to you 2 times in the paste :o)

  -- [EMAIL PROTECTED]   23 Oct 2002 07:21:28 UTC
  -- [EMAIL PROTECTED]   5 Sep 2002 20:19:14 UTC

Maybe I was not clear. QT will also recognize the 6x6x6 cc (and FVWM
2.5.x too of course :o). But full is not terrible, "alot" is better a
5x5x5 + some grey levels. GTK+ and FVWM will recognize it (do not know
for Mozilla, KDE apps will not (I think) and certain QT apps will
recognize it if you use the good options).

Regards, Olivier
_______________________________________________
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert

Reply via email to