On Wed, Nov 06, 2002 at 08:54:59AM -0800, Keith Packard wrote: > Around 15 o'clock on Nov 6, Olivier Chapuis wrote: > > > Secondly, I do not understand the "mono"/"grey" argument to -render. I > > understand "mono"/"grey" when it is the default. However, as an > > option with a 256 PseudoColor Cmap I am totally lost ... as a > > developer. I used XRender in my programs for displaying text (Xft) > > and icons. We have functions which can perform XRender emulation for X > > server/driver without render support. > > Render provides for accelerated and network-efficient client-side text. > Even if that text is strictly monochrome, it's still quite useful. >
Maybe ok for some text (but you risk black on black and white one white). But take the new cursors, the result is catastrophic. > > Finally, I send a patch to this mailing list for an implementation of > > QueryPictIndexValues (Render proto). Are you interested? I can recheck > > it, make the patch against the current cvs I send it to [EMAIL PROTECTED] > > Oh yeah, I'll go dig that up and apply it. Thanks a bunch. > I will send a patch soon. > > About this, I've one trouble. It is the first / last Pixel logic in > > render/miindex.c. For me in any case at the end first = 0 and > > last = "nbr of colors" - 1. No? Why this troubling logic? > > The colormap allocator isn't required to allocate colors in any particular > order; the logic in that function is designed to handle the case where > colors are allocated in some random order. > But FindBest{Color,Gray} assume that the allocated colors by miBuildRenderColormap are consecutive (which is the case in practice). If you have a random "color" in between first and last, FindBest{Color,Gray} may gives a bad result. If the allocator and maybe the initial cmap should be assumed "random" the colors allocated by miBuildRenderColormap should be stored to build the mapping from RGB to pixel values (any way storing the allocated pixels seems needed for QueryPictIndexValues if these pixels may be not consecutive). BTW, it seems strange to have only 13 grey for GrayScale visual with 256 cmap entries. Regrads, Olivier _______________________________________________ Xpert mailing list [EMAIL PROTECTED] http://XFree86.Org/mailman/listinfo/xpert