Re: gdk_draw_image with alpha compositing on X?



---------- Original Message ----------
To: Matthew Allen (list sydneyband com au)
From: Tor Lillqvist (tml iki fi)
Subject: Re: gdk_draw_image with alpha compositing on X?
Date: 3/10/2010 4:42:34a

I'm calling gdk_draw_image with a 32-bit per pixel image with some
pixels having alpha=0 and some with alpha=255, and the transparent
pixels come through as black (not surprisingly). What is the correct was
to get that on to the screen? (for Win32 and X)

For Windows, you can't do any per-pixel alpha in GTK+, sorry.
("patches welcome")

On windows it's EASY to add per pixel alpha for blt'ing, just use the method AlphaBlend, however on Linux I'm 
not sure. Should I be going via Cairo to a client side window? Is that whats supposed to happen? Do the 
client side windows get rendered to a backing store in memory somewhere?

And yes, I can patch GTK+ to use AlphaBlend, but I wouldn't know how to integrate it nicely. Maybe if someone 
outlines some pseudo code or something I could go in and hack something up. Or even where I should make 
mods...
--
Matthew Allen





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]