DXCOMPFUNC enumeration
Describes the method used for compositing by the Compositor transform.
Syntax
typedef enum DXCOMPFUNC {
DXCOMPFUNC_SWAP_AB = 0x10,
DXCOMPFUNC_FUNCMASK = 0xF,
DXCOMPFUNC_CLEAR = 0,
DXCOMPFUNC_MIN,
DXCOMPFUNC_MAX,
DXCOMPFUNC_A,
DXCOMPFUNC_A_OVER_B,
DXCOMPFUNC_A_IN_B,
DXCOMPFUNC_A_OUT_B,
DXCOMPFUNC_A_ATOP_B,
DXCOMPFUNC_A_SUBTRACT_B,
DXCOMPFUNC_A_ADD_B,
DXCOMPFUNC_A_XOR_B,
DXCOMPFUNC_B = ( DXCOMPFUNC_A | DXCOMPFUNC_SWAP_AB ),
DXCOMPFUNC_B_OVER_A = ( DXCOMPFUNC_A_OVER_B | DXCOMPFUNC_SWAP_AB ),
DXCOMPFUNC_B_IN_A = ( DXCOMPFUNC_A_IN_B | DXCOMPFUNC_SWAP_AB ),
DXCOMPFUNC_B_OUT_A = ( DXCOMPFUNC_A_OUT_B | DXCOMPFUNC_SWAP_AB ),
DXCOMPFUNC_B_ATOP_A = ( DXCOMPFUNC_A_ATOP_B | DXCOMPFUNC_SWAP_AB ),
DXCOMPFUNC_B_SUBTRACT_A = ( DXCOMPFUNC_A_SUBTRACT_B | DXCOMPFUNC_SWAP_AB ),
DXCOMPFUNC_B_ADD_A = ( DXCOMPFUNC_A_ADD_B | DXCOMPFUNC_SWAP_AB ),
DXCOMPFUNC_NUMFUNCS
} DXCOMPFUNC;
Constants
DXCOMPFUNC_SWAP_AB
A flag used internally to switch the inputs for A and B.DXCOMPFUNC_FUNCMASK
A bitmask used to check for valid input.DXCOMPFUNC_CLEAR
The transform should perform no operation on the output.DXCOMPFUNC_MIN
Compares the brightness of each sample in both images, and shows only the less bright of the two samples.DXCOMPFUNC_MAX
Compares the brightness of each sample in both images, and shows only the brighter of the two samples.DXCOMPFUNC_A
The transform should write Image A to the output.DXCOMPFUNC_A_OVER_B
The transform should place Image A over Image B. All of Image A will be visible, and Image B will show through any zero alpha regions of Image A.DXCOMPFUNC_A_IN_B
For the resulting image, all parts of Image A that are contained in Image B show. Only regions with nonzero alpha for both images will be visible, and no part of Image B will show through.DXCOMPFUNC_A_OUT_B
For the resulting image, all parts of Image B that are contained in Image A are removed. Areas in Image B with zero alpha are not cut out of Image A.DXCOMPFUNC_A_ATOP_B
For the resulting image, Image A is placed over Image B, with each sample scaled by the alpha channel of Image B.DXCOMPFUNC_A_SUBTRACT_B
For the resulting image, the sample color values of Image B are subtracted from the corresponding sample color values of Image A. The resulting color is scaled by the alpha values of Image A.DXCOMPFUNC_A_ADD_B
For the resulting image, the sample color values of Image B are added to the corresponding sample color values of Image A. The resulting color value is scaled by the alpha value of Image A.DXCOMPFUNC_A_XOR_B
For the resulting image, places where the two images do not overlap show as normal. Places that do overlap are scaled by their inverse value for alpha.DXCOMPFUNC_B
The transform should write Image B to the output.DXCOMPFUNC_B_OVER_A
The same operation as DXCOMPFUNC_A_OVER_B, with Image A and B switched.DXCOMPFUNC_B_IN_A
The same operation as DXCOMPFUNC_A_IN_B, with Image A and B switched.DXCOMPFUNC_B_OUT_A
The same operation as DXCOMPFUNC_A_OUT_B, with Image A and B switched.DXCOMPFUNC_B_ATOP_A
The same operation as DXCOMPFUNC_A_ATOP_B, with Image A and B switched.DXCOMPFUNC_B_SUBTRACT_A
The same operation as DXCOMPFUNC_A_SUBTRACT_B, with Image A and B switched.DXCOMPFUNC_B_ADD_A
The same operation as DXCOMPFUNC_A_ATOP_B, with Image A and B switched.DXCOMPFUNC_NUMFUNCS
The number of supported compositing operations, used for parameter validation.
Remarks
The transform requires two inputs and one output, which are defined by calling the IDXTransform::Setup method. In the following material, Image A corresponds to setup input index 0, and Image B to setup input index 1. The composite operation combines the samples of Image A and Image B according to one of the listed methods. Each one corresponds to a different order of overlaying the images or a different way of combining the sample colors using each image's alpha channel.
Requirements
Minimum supported client |
Windows XP |
Minimum supported server |
Windows 2000 Server |
Header |
Dxtrans.h |
IDL |
Dxtrans.idl |