Partager via


IXpsOMGradientBrush::GetGradientStops method

Gets a pointer to an IXpsOMGradientStopCollection interface that contains the collection of IXpsOMGradientStop interfaces that define the gradient.

Syntax

HRESULT GetGradientStops(
  [out, retval] IXpsOMGradientStopCollection **gradientStops
);

Parameters

Return value

The method returns an HRESULT. Possible values include, but are not limited to, those in the table that follows. For information about XPS document API return values that are not listed in this table, see XPS Document Errors.

Return code Description
S_OK

The method succeeded.

E_POINTER

gradientStops is NULL.

 

Remarks

Gradient stops, which are described in the XPS OM by an IXpsOMGradientStop interface, are used to define the color at a specific location along a gradient path; the color is interpolated between the gradient stops. The illustration that follows shows the gradient path and gradient stops of a linear gradient.

A figure that shows the terms used in a linear gradient

The illustration that follows shows the gradient stops of a radial gradient. In this example, the gradient region is the area enclosed by the outer ellipse, and the radial gradient is using the XPS_SPREAD_METHOD_REFLECT spread method to fill the space outside of the gradient region.

A figure that shows the terms used in a radial gradient

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

Xpsobjectmodel.h

IDL

XpsObjectModel.idl

See also

IXpsOMGradientBrush

IXpsOMGradientStop

XPS Document Errors

XML Paper Specification