This topic has not yet been rated - Rate this topic

ID2D1RenderTarget::CreateGradientStopCollection method

Creates an ID2D1GradientStopCollection from the specified gradient stops that uses the D2D1_GAMMA_2_2 color interpolation gamma and the clamp extend mode.

Syntax


HRESULT CreateGradientStopCollection(
  [in]   D2D1_GRADIENT_STOP *gradientStops,
  UINT gradientStopsCount,
  [out]  ID2D1GradientStopCollection **gradientStopCollection
);

Parameters

gradientStops [in]

Type: 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.

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.

Examples

For an example on how to create a gradient stop collection and use it to define a linear gradient, see How to Create a Linear Gradient Brush.

For an example on how to use a gradient stop collection to define a radial gradient, see How to Create a Radial Gradient Brush.

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]

Header

D2d1.h

Library

D2d1.lib

DLL

D2d1.dll

See also

ID2D1RenderTarget
D2D1_GRADIENT_STOP
How to Create a Linear Gradient Brush
How to Create a Radial Gradient Brush
Brushes Overview

 

 

Send comments about this topic to Microsoft

Build date: 11/29/2012

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.