nanogui: pixmaps and transparency for gif file


Previous by date: 14 Oct 2005 17:47:21 +0100 vncserver (was More cross-compile Q), Yan Seiner
Next by date: 14 Oct 2005 17:47:21 +0100 Transparency of Root Window, amareesh
Previous in thread:
Next in thread: 14 Oct 2005 17:47:21 +0100 Re: pixmaps and transparency for gif file, Greg Haerr

Subject: pixmaps and transparency for gif file
From: tj ####@####.####
Date: 14 Oct 2005 17:47:21 +0100
Message-Id: <434FE15F.2080708@comcast.net>

I am having a problem I cannot understand dealing with images, pixmaps 
and transparency.

I have simple gif image, a black arrow on a white background, saved with 
background transparent.

In my code I load it into an image.

Now, as an image I can use GrDrawImageToFit() to a window and the 
transparency behaves as I expect. What ever is already on the window 
shows through where the image's white background was.

But, if I first draw the image to a pixmap instead of a window and then 
use GrCopyArea() the pixmap to the window, the background of the target 
does not show through the transparent areas. Instead, the background of 
the GR_ROOT_WINDOW shows through!!!! Not what is contained in the target 
window.

My ultimate goal is to have my image icon in a pixmap, then xor text to 
the pixmap so the text runs through the icon and then copy yhe pixmap to 
window. Now the text is visible as one color
on either side of the incon and visible on the icon. Black text  xor'ed 
with Black icon = WHITE. And, since it was done in a pixmap, the text 
outside the icon is black, not possibly multicolored do to xor'ing with 
the original window.

But, my main question is why is the GR_ROOT_WINDOW showing through the 
transparency of the pixmap instead of the target window?

tj


Previous by date: 14 Oct 2005 17:47:21 +0100 vncserver (was More cross-compile Q), Yan Seiner
Next by date: 14 Oct 2005 17:47:21 +0100 Transparency of Root Window, amareesh
Previous in thread:
Next in thread: 14 Oct 2005 17:47:21 +0100 Re: pixmaps and transparency for gif file, Greg Haerr


Powered by ezmlm-browse 0.20.