DirectX SDK |
The D3DXColorAdjustContrast function adjusts the contrast value of a given color.
D3DXCOLOR* D3DXColorAdjustContrast( D3DXCOLOR* pOut, D3DXCOLOR* pC, float c );
The function returns a pointer to a D3DXCOLOR structure that is the result of the contrast adjustment.
The return value for this function is the same value returned in the pOut parameter. In this way, the D3DXColorAdjustContrast function can be used as a parameter for another function.
This function interpolates the red, green, and blue color components of a D3DXCOLOR structure between 50% gray and a specified contrast value:
pOut->r = 0.5f + c * (pC->r - 0.5f);
If c is greater than zero and less than 1, then the contrast will be decreased. If c is greater than 1, then the contrast will be increased.
Windows NT/2000: Requires Windows 2000.
Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
Windows CE: Unsupported.
Version: Requires DirectX 7.0.
Header: Declared in d3dxmath.h.
Library: Use d3dx.lib.