On Thu, May 30, 2002 at 08:36:45AM -0700, Keith Packard wrote: > > Around 15 o'clock on May 30, Olivier Chapuis wrote: > > > It seems that the alpha is not taken in account in a good way > > with the XftTextRender* and XftDrawString* functions (I do not > > check with XRenderCompositeString*). It seems that the computation > > of the final color for rendering the text is done always as if > > the background was white. > > Can you provide a sample app so that we can find the problem? Xterm uses > these APIs and seems to work correctly. >
My message was not clear (it was not exactly this one I wanted to send). Any way, attached to this message a small tarball. Untar it, cd example/, edit the 4 first lines of the Makefile (to set the good CFLAGS and LIBS for your system). Type make. Then type ./main -fg white -bg black & # win1 and ./main -fg black -bg white & # win2 the program draw 11 times "Hello World" with the fg color and with an alpha of 0xffff * (100 - i*10) / 100 at step i. With the window win2 this work as expected the first "Hello World" is black the 5th "Hello World" is grey and you cannot see the last one. With the window win1 the alpha is ignored: all the Hello World are white (you can try others colors: -fg and -bg accept color name for XftColorAllocName and other fonts than "Luxi Mono": -fn "a_font_for_XftFontOpenName"). Note that in fact a similar situation arise with XftDrawRect. Maybe I totally miss something (and I am sorry if it is the case). But it seems to me that there is a bug. Regards, Olivier
example.tar.gz
Description: application/tar-gz
