The FsCompositeOperationState structure represents a composite operation used to combine a source pixel and a destination pixel into a final pixel.

Syntax
struct FsCompositeOperationState {
    int srcRGB;
    int dstRGB;
    int srcAlpha;
    int dstAlpha;
};
Members
MemberDescription
srcRGBRGB source pixel, one of the constants listed below.
dstRGBRGB destination pixel, one of the constants listed below.
srcAlphaAlpha source pixel, one of the constants listed below.
dstAlphaAlpha destination pixel, one of the constants listed below.
Remarks

The members of the struct can take one of the following blend factor constants (these are bit flags, defined as 1 << n):

ConstantValueRGB Blend Factors(Sr, Sg, Sb) or (Dr, Dg, Db)Alpha Blend Factor(Sa) or (Da)
FS_ZERO1(0, 0, 0)0
FS_ONE2(1, 1, 1)1
FS_SRC_COLOR4(Rs, Gs, Bs)As
FS_ONE_MINUS_SRC_COLOR8(1, 1, 1) - (Rs, Gs, Bs)1 - As
FS_DST_COLOR16(Rd, Gd, Bd)Ad
FS_ONE_MINUS_DST_COLOR32(1, 1, 1) - (Rd, Gd, Bd)1 - Ad
FS_SRC_ALPHA64(As, As, As)As
FS_ONE_MINUS_SRC_ALPHA128(1, 1, 1) - (As, As, As)1 - As
FS_DST_ALPHA256(Ad, Ad, Ad)Ad
FS_ONE_MINUS_DST_ALPHA512(1, 1, 1) - (Ad, Ad, Ad)1 - Ad
FS_SRC_ALPHA_SATURATE1024(f, f, f)💡︎1

NOTE - FS_SRC_ALPHA_SATURATE

f = min(As, 1 - Ad), as in the OpenGL blend function this table is modelled on.

0/255