IDCompositionEffectGroup::SetOpacity(float) method

Changes the value of the Opacity property.

Syntax


HRESULT SetOpacity(
  [infloat opacity
);

Parameters

opacity [in]

Type: float

The new value of the Opacity property.

Return value

Type: HRESULT

If the function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code. See DirectComposition Error Codes for a list of error codes.

Remarks

The opacity is interpreted as completely transparent for all values less than or equal to 0, and as completely opaque for all values greater than or equal to 1. All values between 0 and 1 represent partial opacity.

This method fails if the opacity parameter is NaN, positive infinity, or negative infinity.

If the Opacity property was previously animated, this method removes the animation and sets the Opacity property to the specified static value.

Requirements

Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

Windows Server 2012 [desktop apps only]

Header

Dcomp.h

Library

Dcomp.lib

DLL

Dcomp.dll

See also

IDCompositionEffectGroup

 

 

Show: