Hi,

Carsten Haitzler (The Rasterman) <[EMAIL PROTECTED]> writes:

> destination has an alpha channel but has been willed with a solid white
> rectangle (RGBA: 0xff,0xff,0xff,0xff)
> source has an icon - lets say like the gnome png icons so it has a soft drop
> shadow where the transparency gradually changes from opaque to transparent at
> the edges of the icon to show a shadow.
> 
> when we blend this icon onto the destination, parts of the destination image
> approximately where the alpha pixel values of the icon is about 0x80 the alpha
> channel of the destination starts becomming less than 0xff (ie i am guessing
> about 0xc0 by visual inspection).
> 
> well - as we can imagine, this is NOT the desired effect. when you blend 
> something on top a completely solid image, you don't want it starting to become
> transparent! :)

the behaviour of the blending operation depends on the BlendFunctions
you choose for source and destination surface. It seems that the
default behaviour is not what you want, but you are free to use
IDirectFB::SetBlendFunction to modify it. If I understand you
correctly, you are seeking for a saturating blend. IIRC, that would be
DSBF_SRCALPHA on the source and DSBF_INVSRCALPHA on the destination
surface.


Salut, Sven


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

Reply via email to