Yes, I definitely understand that. I were doing that as proof of concept. 

BTW, just after I send out my previous mail last night, I realized I forgot 
to set DSDRAW_BLEND flag to enable alpha blending in drawing operations. 
After I fixed that(just one more line:), it worked! But when I tried to send 
email again to this mailing list, it keeped being bounced back. :(

Thanks.

On Wednesday 07 April 2004 23:04, Sven Neumann wrote:
> Hi,
>
> Xiong Huan <[EMAIL PROTECTED]> writes:
> > 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?
>
> Changing GTK+/GDK structures out of the directfb directory is not
> possible since we want this port to be integrated with the GTK+
> mainline. So unless there's alpha transparency support in the
> mainline, transparency on the gdk-directfb level will always be a
> kludge.
>
>
> Sven


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

Reply via email to