On Wed, 2004-04-07 at 09:10, Xiong Huan wrote:
> Hi,
> 
> I am considering leverage DirectFB's RGBA support and exposing it on 
> GDK/GTK level. I noticed gdk-directfb uses standard GdkColor definition and 
> thus hides the underlying alpha-blending support. So I appended a new filed 
> "guchar alpha" in GdkColor structure, and in gdk_directfb_setup_for_drawing() 
> I assigned this value to "alpha" varialbe rather than used the original 
> hardcoded one(0xFF). I think this is a simple way to pass alpha value from 
> user to directfb and, at the same time, make as little change as possible.
> 
> Then I modified gtk_style_real_realize() in gtkstyle.c trying to test my 
> change. I hardcoded style->black.alpha to be 120, which is later passed to 
> gc_values.foreground. Then I run a simple gtk button application, thinking 
> its foregound color will be semi-transparent. However, there is no change at 
> all. 
> 
> I added some debug information in gdk_directfb_draw_lines() function and 
> notieced the alpha value(120 in my case) was really passed in it. But why it 
> has no effect at all? 
> 
> Am I missing somthing here? Can anyone throw some light on it?

I believe this was just discussed a few weeks ago on the list, so you
may want to check the archives.  My understanding is that gdk-DirectFB
only supports transparency at the "window" level.  Now there is often
confusion about what is a window, since the meaning differs from
platform to platform and framework to framework.  To make a long story
short: you are not assigning the transparency at a high-enough hierarchy
level.

I'm just rehashing my understanding of what was discussed.  I'm not a
GTK/DirectFB expert.
-- 
Thanks,
Bill Hayden



-- 
Info: To unsubscribe send a mail to [EMAIL PROTECTED] with 
"unsubscribe directfb-users" as subject.

Reply via email to