?/TD>
Microsoft DirectX 9.0

D3DXColorScale Function


Scales a color value.

Syntax

D3DXCOLOR *D3DXColorScale(      

    D3DXCOLOR *pOut,     CONST D3DXCOLOR *pC,     FLOAT s );

Parameters

pOut
[in, out] Pointer to a D3DXCOLOR structure that is the result of the operation.
pC
[in] Pointer to a source D3DXCOLOR structure.
s
[in] Scale factor. It scales the color, treating it like a 4-D vector. There are no limits on the value of s. If s is 1, the resulting color is the original color.

Return Value

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;

Function Information

Headerd3dx9math.h
Import libraryd3dx9.lib
Minimum operating systems Windows 98

See Also

D3DXColorLerp, D3DXColorModulate, D3DXColorNegative


© 2002 Microsoft Corporation. All rights reserved.