Hi,
I have a question on the blit flag DSBLIT_SRC_PREMULTCOLOR. What I see, this flag enables premultiplications of the source color components(RGB) with the alpha of color set(extraAlpha value). Correct?
I was refering to: http://www.directfb.org/wiki/index.php/Blending_HOWTO

According to my understanding, SRC_OVER blend for color components with extraAlpha would mean(assuming both source and destination colors are premultiplied):
Cd = (Ca * extraAlpha)*Cs + (1 - Ca * extraAlpha)*Cd

Specifying DSBLIT_BLEND_ALPHACHANNEL alone would mean no consideration of extraAlpha value(or alpha set by doing SetColor). So we still need to pass in the blit flag DSBLIT_BLEND_COLORALPHA to get extraAlpha included in the above equation. Am I correct with this? Because I don't see this in the documentation.

But then passing DSBLIT_BLEND_COLORALPHA along with DSBLIT_SRC_PREMULTCOLOR would mean that the source color components(RGB) would undergo multiplication by the extraAlpha value twice.
Any views?

Thanks in advance!

-- Sourath






_______________________________________________
directfb-users mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users

Reply via email to