Share via


IXRLinearGradientBrush::SetStartPoint (Windows Embedded CE 6.0)

1/6/2010

This method sets the two-dimensional coordinates of the starting point for this linear gradient.

Syntax

virtual HRESULT STDMETHODCALLTYPE SetStartPoint(
    XRPoint* pStartPoint
) = 0;

Parameters

  • pStartPoint
    [in] Pointer to an XRPoint structure that describes the x-y coordinates of the gradient starting point.

Return Value

Returns an HRESULT that indicates success or failure.

Remarks

An IXRLinearGradientBrush paints a gradient along a line. The line's starting points and endpoints are defined by SetStartPoint and IXRLinearGradientBrush::SetEndPoint in the IXRLinearGradientBrush class.

The default linear gradient is diagonal, and the default mode for the gradient coordinate system is XRBrushMappingMode_RelativeToBoundingBox. When the the inherited method IXRGradientBrush::GetMappingMode returns the mapping mode XRBrushMappingMode_RelativeToBoundingBox, pStartPoint is a logical point, where values between 0 and 1 are mapped against the total size of the resulting bounding box. By default, the pStartPoint value of a linear gradient is an XRPoint value of (0,0), the upper-left corner of the area being painted. The colors in the resulting gradient are interpolated and applied along vectors that parallel this diagonal axis.

.NET Framework Equivalent

System.Windows.Media.LinearGradientBrush.StartPoint

Requirements

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

See Also

Reference

IXRLinearGradientBrush
IXRLinearGradientBrush::GetStartPoint