D3DXCOLORADJUSTCONTRAST functions
Adjust the color contrast value.
definition
D3DxColor * WinAPI D3DXCOLORADJUSTCONTRAST
D3DXColor * Pout,
Const d3dxcolor * pc,
Float C
);
parameter:
pout
[IN, OUT] points to the D3DxColor structure, return the results of the operation.
PC
[in] Pointing the color D3DxColor to be adjusted
c
[in] contrast value. This parameter is a linear adjustment between 50% grayscale and PC. If c is equal to 0, then the return color is 50% grayscale. If. C is equal to 1, returns the original color.
return value:
Returns the color value after the D3DxColor structure adjustment.
Description
The entered Alpha value is completely copied without any modifications.
The return value here is the same as the POUT in the parameter. By returning the value, this function can be made into the parameters of other functions.
The red, green, and blue of this function will calculate the result of the following formula:
Pout-> r = 0.5f c * (pc-> R - 0.5F);
If C is less than 1, the contrast is reduced. If C is greater than 1, it will increase the contrast.
Function information:
HEADER
D3DX9Math.h
Import Library
D3DX9.LIB
Minimum operation systems
WINDOWS 98
Simultaneous related functions:
D3DXCOLORADJUSTSURATION