Thank you, yes I see now how the two statements do correspond.

I found the sentence construction hard to follow: "The new key will be taken
by the destination surface to apply it to its state when source color keying
is used" but this is probably due to my lack of clear thinking.

It seems that the color key is treated in this way, but not the blend
functions which I would expect to have been treated similarly. That is, the
source blend function does affect the target surface's state (and is not
taken from the source when a Blit is done) - at least that is what seems to
happen and what seems to be done in the source code.

To clarify what I mean:

1) the color key state is set during the Blit()
2) the source blend function state is set during SetSrcBlendFunction()

Thus, I must set the source color key on the eventual source surface.
But, I must set the source blend function on the eventual destination
surface.

These are opposite behaviors.

This seems to happen in practice. It also seems to be assumed by
SetPorterDuff() which sets the source and destination blend functions for a
single surface to correspond with the required Porter Duff rule. Which can
only work if the source blend function is taken from the destination surface
and not from the source (the source not having had SetPorterDuff).

I may again be missing what is to some obvious, but I would value
confirmation.

Is this behavior with source blend functions in fact as I describe?
Is it indeed different from the way source color keying works?
Is this the intention?

Thanks in advance,

Chris
========================
Chris Bore
BORES Signal Processing
[EMAIL PROTECTED]
www.bores.com
Tel:    +44 1483 740138
Mobile: +44 7921 153 219 

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ville Syrjälä
Sent: 07 September 2007 23:11
To: [EMAIL PROTECTED]
Cc: [email protected]
Subject: Re: [directfb-dev] ColorKey

On Fri, Sep 07, 2007 at 05:10:30PM +0100, [EMAIL PROTECTED] wrote:
> Following my post on SetSrcColorKey().
> 
> The documentation for IDirectFBSurface::SetSrcColorKey() says:
> 
> Set the source color key, i.e. the color that is excluded when 
> blitting FROM this surface TO another that has source color keying
enabled.
> 
> But the source code (lines 857-859 of idirectfbsurface.c in DFB 1.0.0
says:
> 
> The new key won't be applied to this surface's state.
> The new key will be taken by the destination surface to apply it to 
> its state when source color keying is used.
> 
> I am not sure these statements in fact directly contradict each other 
> but they sure confuse me.

They don't seem at all contradictory to me ie. dst->Blit(dst, src, ...) will
take the source color key value from src.

--
Ville Syrjälä
[EMAIL PROTECTED]
http://www.sci.fi/~syrjala/

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


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

Reply via email to