次の方法で共有


IXRRadialGradientBrush::SetGradientOrigin (Windows Embedded CE 6.0)

1/6/2010

This method sets the location of the focal point where the radial gradient begins.

Syntax

virtual HRESULT STDMETHODCALLTYPE SetGradientOrigin(
    XRPoint* pGradientOrigin
) = 0;

Parameters

  • pGradientOrigin
    [in] Pointer to an XRPoint structure that defines the two-dimensional location that is the beginning of the radial gradient pattern.

Return Value

Returns an HRESULT that indicates success or failure.

Remarks

When the inherited method IXRGradientBrush::GetMappingMode indicates that the mapping mode is set to XRBrushMappingMode_RelativeToBoundingBox, Center and GradientOrigin are "logical points." Logical points have values between 0 and 1 and are mapped against the total size of the resulting bounding box where this brush is applied. A point value of 0.5 sets the center and gradient origin to the logical center of the bounding box.

If the mapping mode is set to XRBrushMappingMode_Absolute, GradientOrigin should be supplied as a true point value in the coordinate system.

When the Center and the GradientOrigin are at the same point, they can create the illusion of a specular highlight from a direct lighting source. By contrast, when they are not at the same point, they can create the illusion of a specular highlight from an "off-center" lighting source. This technique is very useful for creating three-dimensional effects from two-dimensional objects.

.NET Framework Equivalent

System.Windows.Media.RadialGradientBrush.GradientOrigin

Requirements

Header XamlRuntime.h
sysgen SYSGEN_XAML_RUNTIME
Windows Embedded CE Windows Embedded CE 6.0 R3

See Also

Reference

IXRRadialGradientBrush
IXRRadialGradientBrush::GetGradientOrigin