Microsoft DirectX 9.0 SDK Update (October 2004)

ColorOperator.AdjustSaturation Method

Language:

Note: This documentation is preliminary and is subject to change.

Adjusts the saturation value of a color.

Definition

Visual Basic .NET Public Shared Function AdjustSaturation( _
    ByVal c As Integer, _
    ByVal s As Single _
) As Integer
C# public static int AdjustSaturation(
    int c,
    float s
);
Managed C++ public: static int AdjustSaturation(
    int c,
    float s
);
JScript .NET public static function AdjustSaturation(
    c : int,
    s : float
) : int;

Parameters

c System.Int32.
s System.Single. Floating-point value that represents the saturation value to apply to the given color. See Remarks.

Return Value

System.Int32 .

Remarks

The s parameter linearly interpolates between the color converted to grayscale and the original color. There are no limits on the parameter's value. If the value is 0, the returned color is the grayscale color. If the value is 1, the returned color is the original color. If s is greater than 0 and less than 1, the saturation is decreased; if it is greater than 1, the saturation is increased.

The input alpha channel is copied, unmodified, to the output alpha channel.


© 2004 Microsoft Corporation. All rights reserved. Terms of use.

Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center