Microsoft DirectX 8.0 (Visual Basic) |
Adjusts the contrast value of a color.
D3DXColorAdjustContrast( _ COut As D3DCOLORVALUE, _ C1 As D3DCOLORVALUE, _ c As Single)
If the function fails, an error is raised and Err.Number can be set to one of the following values:
D3DERR_INVALIDCALL |
D3DERR_OUTOFVIDEOMEMORY |
For information on trapping errors, see the Microsoft® Visual Basic® Error Handling topic.
This function interpolates the red, green, and blue color components of a D3DCOLORVALUE type between 50 percent gray and a specified contrast value, as shown in the following example.
Cout.r = 0.5 + c * (C1.r - 0.5)
If c is greater than 0 and less than 1, the contrast is decreased. If c is greater than 1, then the contrast is increased.