Share via


IXRGradientBrush::SetSpreadMethod (Compact 2013)

3/28/2014

This method sets the spread method used to determine how a gradient is drawn when it starts or ends inside the bounds of the target object.

Syntax

virtual HRESULT STDMETHODCALLTYPE SetSpreadMethod(
    XRGradientSpreadMethod SpreadMethod
) = 0;

Parameters

  • SpreadMethod
    [in] XRGradientSpreadMethod enumerated type that describes the kind of spread method used to paint the gradient.

Return Value

Returns an HRESULT that indicates success or failure.

Remarks

The following illustration shows the available spread methods and their effect on IXRLinearGradientBrush and IXRRadialGradientBrush. The red line indicates the gradient space. A linear gradient-brush defines its gradient space with its StartPoint and EndPoint properties. A radial gradient-brush defines its gradient space with its Center, RadiusX, and RadiusY properties.

Spread method

Linear gradient example

Radial gradient example

Pad

Ee501661.3e2a6380-cef3-4ae7-b180-4aee967894d4(en-us,WinEmbedded.80).jpg
Ee501661.a0c9cb6d-2b75-4b33-9593-d3af03ca5c58(en-us,WinEmbedded.80).jpg

Reflect

Ee501661.92c1d928-80c2-44f1-aa1a-797befa217d0(en-us,WinEmbedded.80).jpg
Ee501661.95756ce1-4efd-48e2-bc7b-9d48cf73ab90(en-us,WinEmbedded.80).jpg

Repeat

Ee501661.cc1b41bc-d27f-4180-a94c-e4601ece976d(en-us,WinEmbedded.80).jpg
Ee501661.b3ed9447-88d5-48ea-9466-d975e9a11438(en-us,WinEmbedded.80).jpg

.NET Framework Equivalent

System.Windows.Media.GradientBrush.SpreadMethod

Requirements

Header

XamlRuntime.h

sysgen

SYSGEN_XAML_RUNTIME

See Also

Reference

IXRGradientBrush
IXRGradientBrush::GetSpreadMethod