D3DXColorScale function
Note
The D3DX utility library is deprecated. We recommend that you use DirectXMath instead.
Scales a color value.
Syntax
D3DXCOLOR* D3DXColorScale(
_Inout_ D3DXCOLOR *pOut,
_In_ const D3DXCOLOR *pC,
_In_ FLOAT s
);
Parameters
-
pOut [in, out]
-
Type: D3DXCOLOR*
Pointer to a D3DXCOLOR structure that is the result of the operation.
-
pC [in]
-
Type: const D3DXCOLOR*
Pointer to a source D3DXCOLOR structure.
-
s [in]
-
Type: FLOAT
Scale factor. It scales the color, treating it like a 4D vector. There are no limits on the value of s. If s is 1, the resulting color is the original color.
Return value
Type: D3DXCOLOR*
This function returns a pointer to a D3DXCOLOR structure that is the scaled color value.
Remarks
The return value for this function is the same value returned in the pOut parameter. In this way, the D3DXColorScale function can be used as a parameter for another function.
This function computes the scaled color value by multiplying the color components of the D3DXCOLOR structure by the specified scale factor, as shown in the following example.
pOut->r = pC->r * s;
Requirements
Requirement | Value |
---|---|
Header |
|
Library |
|
See also