LinearGradientBrush::LinearGradientBrush(constPoint&,constPoint&,constColor&,constColor&) method (gdiplusbrush.h)

Creates a LinearGradientBrush::LinearGradientBrush object from a set of boundary points and boundary colors.

Syntax

void LinearGradientBrush(
  [in, ref] const Point & point1,
  [in, ref] const Point & point2,
  [in, ref] const Color & color1,
  [in, ref] const Color & color2
);

Parameters

[in, ref] point1

Type: const Point

Reference to a Point object that specifies the starting point of the gradient. The starting boundary line passes through the starting point.

[in, ref] point2

Type: const Point

Reference to a Point object that specifies the ending point of the gradient. The ending boundary line passes through the ending point.

[in, ref] color1

Type: const Color

Reference to a Color object that specifies the color at the starting boundary line of this linear gradient brush.

[in, ref] color2

Type: const Color

Reference to a Color object that specifies the color at the ending boundary line of this linear gradient brush.

Return value

None

Remarks

The "directional line," an imaginary straight line, is defined by the starting point, point1, and the ending point, point2. The starting boundary of the gradient is a straight line that is perpendicular to the directional line and that passes through the starting point. The ending boundary of the gradient is a straight line that is parallel to the starting boundary line and that passes through the ending point. The gradient color is constant along lines that are parallel to the boundary lines. The gradient gradually changes from the starting color to the ending color along the directional line.

Requirements

Requirement Value
Target Platform Windows
Header gdiplusbrush.h

See also

Color

Point

LinearGradientBrush