Il giorno mar, 11/03/2008 alle 14.03 -0400, Max Compston ha scritto: > Hi, > > I have an application where I am creating a surface for rendering on the > primary surface. The problem is that this surface is opaque and I need > to make it globally transparent. I need to find a method to blit this > opaque surface to the primary surface having a global alpha transparent > value. This layer needs to be transparent because I am displaying video > on layers 4 or 5. > > I cannot seem to make this opaque surface transparent or blend this with > an alpha from the primary surface. > > I can easily create this surface with an alpha value and blit it to the > primary surface. If the surface is transparent it blits over the > primary surface in the manner I am seeking. However, I cannot seem to > make the surface transparent if it is opaque when created. > > I have looked into previous posts for Blending HOWTO and posts on layer > opacity and tired various methods but to no avail. > > Thanks in advance for any help you can provide. > > Snippet of my example code below. > ... > > DFBCHECK(pFrameBuffer->SetBlittingFlags(pImage, > DSBLIT_BLEND_ALPHACHANNEL | DSBLIT_SRC_PREMULTCOLOR));
Probably you want DSBLIT_BLEND_COLORALPHA (instead of DSBLIT_BLEND_ALPHACHANNEL), if you need a global transparency value. > > DFBCHECK(pFrameBuffer->Blit(pFrameBuffer, pImage, NULL, x, y)); > > /* Leave the image on the display for 'X' seconds */ > sleep(delay); > > Regards, > Max > -- Claudio Ciccani [EMAIL PROTECTED] [EMAIL PROTECTED] http://directfb.org _______________________________________________ directfb-users mailing list [email protected] http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users
