The formula for blending is : (256-a_source) / 256 * destination +
a_source/256*source
where:
* a_source is the alpha component of the source,
* destination is one of the color component of the destination
* source is the same color component, but for the source
Let's consider for example the red component (it works with any
component)
Our source is 01ff ff ff, ie white with a minimal alpha component,
and its red component is therefore 255
Our destination can be any colour, let's assume its red component is 50.
each time I apply my filter, the color of the destination becomes :
(256 - 1)/256 * destination + 1/256*255
This is an sequence defined by u_{n+1} = 255/256 * u_{n} + 255/256,
which generic term is:
u_n = (255/256)^n * (50 - 255) + 255
which will tend to 255. Therefore it should work.
However, a simple verification shows that 1000 iterations will only
get you to 251, which means that the residue shape is perfectly normal.
I'm sorry for this mathematical post, but it explains the phenomena.
Thanks for the blending formula, I had no idea how it was done.
--
Jérémy
_______________________________________________
directfb-users mailing list
directfb-users@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users