You mean your background is something like alpha 0, and rgb 0xffffff?

This again has its roots in premultiplication. DirectFB assumes that your destination surface is premultiplicated. This means that your colours will always be relative to your alpha. The result is that your alpha is "bounding" the colours, so the colours are always smaller (or equal) than the alpha. With normal blitting situations this is not an issue, since there DirectFB will handle premutiplication if the source surface is not premultiplied (you need to specify this at surface creation). If you work on the background surface yourself, you have to handle this yourself too.

To sort this, make sure your background has colour rgb 0x000000, or specify your destination as being non-premultiplied (but this is a costly operation), I think *DSBLIT_DST_PREMULTIPLY *is the flag to use.

Hope this was clear also,
grts
Niels

Dave Craig wrote:
Hi,

Seeing as there have been some discussion on blitting modes here in the
last few days, I'd like to bring up an issue I had which I never got to
the bottom of.

I've got an issue with DrawGlyph in 1.2.6 when I'm blitting to a surface
which is fully transparent. Though the destination alpha is zero, some
of the destination color seeps in during the blit of the glyph. This is
easiest seen where the background is fully transparent black, the font
color is fully opaque white and the background layer is fully white. The
result is white text on a white background but with a light grey dotted
outline of text. The light grey is the result of the transparent black
background being blended in to the foreground color.

It may be that the destination alpha isn't being taken into account
during the blit. I've tried merging some blending changes from 1.4.x but
with no change in the net result. Is this a bug in the particular blend
implementation being called, or expected behaviour based on the blitting
flags being used (DSBLIT_BLEND_ALPHACHANNEL | DSBLIT_COLORIZE setup in
fonts.c). Any suggestions about what might be the issue and how to
proceed would be gratefully received.

Hope I've been clear,

Thanks!

Dave.

........................................................................
Dave Craig
Senior Software Engineer
BrightSign
_______________________________________________
directfb-users mailing list
directfb-users@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users



--

.------------------------------------------.
| DirectFB - Hardware accelerated graphics |
| http://www.directfb.org/                 |
"------------------------------------------"
_______________________________________________
directfb-users mailing list
directfb-users@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users

Reply via email to