次の方法で共有


IXRGradientBrush::GetSpreadMethod (Compact 2013)

3/28/2014

This method retrieves 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 GetSpreadMethod(
    XRGradientSpreadMethod* pSpreadMethod
) = 0;

Parameters

  • pSpreadMethod
    [in] Pointer to an 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 StartPoint and EndPoint properties. A radial gradient-brush defines its gradient space with Center, RadiusX, and RadiusY properties.

Spread method

Linear gradient example

Radial gradient example

Pad

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

Reflect

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

Repeat

Ee502474.cc1b41bc-d27f-4180-a94c-e4601ece976d(en-us,WinEmbedded.80).jpg
Ee502474.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::SetSpreadMethod