IDCompositionAnimation::End method (dcompanimation.h)

Adds an end segment that marks the end of an animation function.

Syntax

HRESULT End(
  [in] double endOffset,
  [in] float  endValue
);

Parameters

[in] endOffset

Type: double

The offset, in seconds, from the beginning of the animation function to the point when the function ends.

[in] endValue

Type: float

The final value of the animation.

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

When the specified offset is reached, the property or properties affected by this animation are set to the specified final value, and then the animation stops. If no end segment is added, the final segment of the animation function runs indefinitely. Calling this method is semantically identical to making the last segment of the animation function a cubic polynomial where the cubic, quadratic, and linear coefficients are all zeros, and the constant coefficient is the desired final value.

Because animation segments must be added in increasing order, this method fails if the endOffset parameter is less than or equal to the beginOffset parameter of the previous segment. This method also fails if this is the first segment to be added to the animation function.

After this method is called, all methods on this animation object fail except the IDCompositionAnimation::Reset method.

Requirements

Requirement Value
Minimum supported client Windows 8 [desktop apps only]
Minimum supported server Windows Server 2012 [desktop apps only]
Target Platform Windows
Header dcompanimation.h
Library Dcomp.lib
DLL Dcomp.dll

See also

IDCompositionAnimation