次の方法で共有


IXRLinearGradientBrush (Windows Embedded CE 6.0)

1/6/2010

This class represents a brush that paints an area with a linear gradient.

Syntax

class IXRLinearGradientBrush : public IXRGradientBrush

Methods

Method Description

IXRLinearGradientBrush::GetEndPoint

Retrieves the two-dimensional coordinates of the ending point for this linear gradient.

IXRLinearGradientBrush::GetStartPoint

Retrieves the two-dimensional coordinates of the starting point for this linear gradient.

IXRLinearGradientBrush::SetEndPoint

Sets the two-dimensional coordinates of the ending point for this linear gradient.

IXRLinearGradientBrush::SetStartPoint

Sets the two-dimensional coordinates of the starting point for this linear gradient.

Remarks

An IXRLinearGradientBrush object defines a gradient pattern along a line. The endpoints of the line are defined by the StartPoint and EndPoint properties of the linear gradient. A linear gradient paints its IXRGradientStop objects along the line. Each IXRGradientStop is stored in the collection retrieved by the inherited method IXRGradientBrush::GetGradientStops.

With the default setting, the StartPoint of a linear gradient is an XRPoint with a value of (0,0), the upper-left corner of the area being painted, and its EndPoint is an XRPoint with a value of (1,1), the lower-right corner of the area being painted. The colors in the resulting gradient are interpolated along the diagonal path.

You can specify a gradient axis that does not completely fill the area being painted. To do this, use the IXRGradientBrush::SetSpreadMethod inherited method.

You can also define a linear gradient in Microsoft Silverlight 2 XAML. For information about the differences between XAML in Silverlight for Windows Embedded and Silverlight 2, see Differences Between Silverlight for the Web and Silverlight for Windows Embedded. For more information about how to define this element in the source XAML for your application, see this Microsoft Web site.

Inheritance Hierarchy

IXRDependencyObject

    IXRBrush

        IXRGradientBrush

            IXRLinearGradientBrush

.NET Framework Equivalent

System.Windows.Media.LinearGradientBrush

Requirements

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

See Also

Reference

Classes for Visual Appearance and Behavior

Other Resources