Transparency of the layer is a property of your hardware. There is a few
ways to set transparency for layers or surfaces. You have to try they and
choose what is working properly for your goals.

1 Using SetSrcColorKey()  see
http://www.directfb.org/docs/DirectFB_Reference_1_0/IDirectFBDisplayLayer_SetSrcColorKey.html

2 Using SetDstColor() see
http://www.directfb.org/docs/DirectFB_Reference_1_0/IDirectFBDisplayLayer_SetDstColorKey.html

3 You can too set some pixel format with alpha channel for the layer. (ARGB,
ARGB4444, ARGB1555 and so on). In this case lower layer will appear through
upper. Colour of result pixel can be calculated:  Pscr = Plo * (1 - A) + Pup
* A.

Pscr  is a screen pixel.

Plo is a pixel of lower layer.

Pup is a pixel of upper layer.

A is a normalized value of the alpha channel from pixel of upper layer. If A
is 0 - you'll see only background.If the alpha channel has the greatest
value you'll see only upper pixel.

-- 
Best Regards
Nikita Egorov
nik...@gmail.com
nik...@varma-el.com
_______________________________________________
directfb-dev mailing list
directfb-dev@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev

Reply via email to