ID2D1RenderTarget::CreateGradientStopCollection method

Creates an ID2D1GradientStopCollection from the specified gradient stops, color interpolation gamma, and extend mode.

Syntax


virtual HRESULT CreateGradientStopCollection(
  [in]  const D2D1_GRADIENT_STOP          *gradientStops,
              UINT                        gradientStopsCount,
              D2D1_GAMMA                  colorInterpolationGamma,
              D2D1_EXTEND_MODE            extendMode,
  [out]       ID2D1GradientStopCollection **gradientStopCollection
) = 0;

Parameters

gradientStops [in]

Type: const D2D1_GRADIENT_STOP*

A pointer to an array of D2D1_GRADIENT_STOP structures.

gradientStopsCount

Type: UINT

A value greater than or equal to 1 that specifies the number of gradient stops in the gradientStops array.

colorInterpolationGamma

Type: D2D1_GAMMA

The space in which color interpolation between the gradient stops is performed.

extendMode

Type: D2D1_EXTEND_MODE

The behavior of the gradient outside the [0,1] normalized range.

gradientStopCollection [out]

Type: ID2D1GradientStopCollection**

When this method returns, contains a pointer to a pointer to the new gradient stop collection.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Requirements

Minimum supported client

Windows 7, Windows Vista with SP2 and Platform Update for Windows Vista [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 R2, Windows Server 2008 with SP2 and Platform Update for Windows Server 2008 [desktop apps | Windows Store apps]

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Header

D2d1.h

Library

D2d1.lib

DLL

D2d1.dll

See also

ID2D1RenderTarget

 

 

Show: