FsCompositeOperation

The FsCompositeOperation represents a composite operation used to combined a source pixel and a destination pixel into a final pixel.

 

Syntax
struct FsCompositeOperationState {
    int srcRGB;
    int dstRGB;
    int srcAlpha;
    int dstAlpha;
};

 

Members
Member Description
srcRGB RGB source pixel, one of the constants listed below.
dstRGB RGB destination pixel, one of the constants listed below.
srcAlpha Alpha source pixel, one of the constants listed below.
dstAlpha Alpha destination pixel, one of the constants listed below.

 

Remarks

The members of the struct can take one of the following blend factor constants:

Constant

RGB Blend Factors

(Sr, Sg, Sb) or (Dr, Dg, Db)

Alpha Blend Factor

(Sa) or (Da)

FS_ZERO (0, 0, 0) 0
FS_ONE (1, 1, 1) 1
FS_SRC_COLOR (Rs, Gs, Bs) As
FS_ONE_MINUS_SRC_COLOR (1, 1, 1) - (Rs, Gs, Bs) 1 - As
FS_DST_COLOR (Rd, Gd, Bd) Ad
FS_ONE_MINUS_DST_COLOR (1, 1, 1) - (Rd, Gd, Bd) 1 - Ad
FS_SRC_ALPHA (As, As, As) As
FS_ONE_MINUS_SRC_ALPHA (1, 1, 1) - (As, As, As) 1 - As
FS_DST_ALPHA (Ad, Ad, Ad) Ad
FS_ONE_MINUS_DST_ALPHA (1, 1, 1) - (Ad, Ad, Ad) 1 - Ad
FS_SRC_ALPHA_SATURATE (f, f, f) (*2) 1

 

 

See Also