LinearGradientBrush class

Applies to: desktop apps only

The LinearGradientBrush class defines a brush that paints a color gradient in which the color changes evenly from the starting boundary line of the linear gradient brush to the ending boundary line of the linear gradient brush. The boundary lines of a linear gradient brush are two parallel straight lines. The color gradient is perpendicular to the boundary lines of the linear gradient brush, changing gradually across the stroke from the starting boundary line to the ending boundary line. The color gradient has one color at the starting boundary line and another color at the ending boundary line.

Members

The LinearGradientBrush class inherits from Brush. LinearGradientBrush also has these types of members:

Constructors

The LinearGradientBrush class has these constructors.

ConstructorDescription
LinearGradientBrush::LinearGradientBrush(Point&,Point&,Color&,Color&)

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

LinearGradientBrush::LinearGradientBrush(PointF&,PointF&,Color&,Color&)

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

LinearGradientBrush::LinearGradientBrush(Rect&,Color&,Color&,LinearGradientMode)

Creates a LinearGradientBrush::LinearGradientBrush object based on a rectangle and mode of direction.

LinearGradientBrush::LinearGradientBrush(Rect&,Color&,Color&,REAL,BOOL)

Creates a LinearGradientBrush::LinearGradientBrush object from a rectangle and angle of direction.

LinearGradientBrush::LinearGradientBrush(Rect&,Color&,Color&,REAL,BOOL)

Creates a LinearGradientBrush::LinearGradientBrush object from a rectangle and angle of direction.

LinearGradientBrush::LinearGradientBrush(RectF&,Color&,Color&,LinearGradientMode)

Creates a LinearGradientBrush::LinearGradientBrush object based on a rectangle and mode of direction.

 

Methods

The LinearGradientBrush class has these methods.

MethodDescription
LinearGradientBrush::GetBlend

The LinearGradientBrush::GetBlend method gets the blend factors and their corresponding blend positions from a LinearGradientBrush object.

LinearGradientBrush::GetBlendCount

The LinearGradientBrush::GetBlendCount method gets the number of blend factors currently set for this LinearGradientBrush object.

LinearGradientBrush::GetGammaCorrection

The LinearGradientBrush::GetGammaCorrection method determines whether gamma correction is enabled for this LinearGradientBrush object.

LinearGradientBrush::GetInterpolationColorCount

The LinearGradientBrush::GetInterpolationColorCount method gets the number of colors currently set to be interpolated for this linear gradient brush.

LinearGradientBrush::GetInterpolationColors

The LinearGradientBrush::GetInterpolationColors method gets the colors currently set to be interpolated for this linear gradient brush and their corresponding blend positions.

LinearGradientBrush::GetLinearColors

The LinearGradientBrush::GetLinearColors method gets the starting color and ending color of this linear gradient brush.

LinearGradientBrush::GetRectangle(Rect*)

The LinearGradientBrush::GetRectangle method gets the rectangle that defines the boundaries of the gradient.

LinearGradientBrush::GetRectangle(RectF*)

The LinearGradientBrush::GetRectangle method gets the rectangle that defines the boundaries of the gradient.

LinearGradientBrush::GetTransform

The LinearGradientBrush::GetTransform method gets the transformation matrix of this linear gradient brush.

LinearGradientBrush::GetWrapMode

The LinearGradientBrush::GetWrapMode method gets the wrap mode for this brush. The wrap mode determines how an area is tiled when it is painted with a brush.

LinearGradientBrush::MultiplyTransform

The LinearGradientBrush::MultiplyTransform method updates this brush's transformation matrix with the product of itself and another matrix.

LinearGradientBrush::ResetTransform

The LinearGradientBrush::ResetTransform method resets the transformation matrix of this linear gradient brush to the identity matrix. This means that no transformation takes place.

LinearGradientBrush::RotateTransform

The LinearGradientBrush::RotateTransform method updates this brush's current transformation matrix with the product of itself and a rotation matrix.

LinearGradientBrush::ScaleTransform

The LinearGradientBrush::ScaleTransform method updates this brush's current transformation matrix with the product of itself and a scaling matrix.

LinearGradientBrush::SetBlend

The LinearGradientBrush::SetBlend method sets the blend factors and the blend positions of this linear gradient brush to create a custom blend.

LinearGradientBrush::SetBlendBellShape

The LinearGradientBrush::SetBlendBellShape method sets the blend shape of this linear gradient brush to create a custom blend based on a bell-shaped curve.

LinearGradientBrush::SetBlendTriangularShape

The LinearGradientBrush::SetBlendTriangularShape method sets the blend shape of this linear gradient brush to create a custom blend based on a triangular shape.

LinearGradientBrush::SetGammaCorrection

The LinearGradientBrush::SetGammaCorrection method specifies whether gamma correction is enabled for this linear gradient brush.

LinearGradientBrush::SetInterpolationColors

The LinearGradientBrush::SetInterpolationColors method sets the colors to be interpolated for this linear gradient brush and their corresponding blend positions.

LinearGradientBrush::SetLinearColors

The LinearGradientBrush::SetLinearColors method sets the starting color and ending color of this linear gradient brush.

LinearGradientBrush::SetTransform

The LinearGradientBrush::SetTransform method sets the transformation matrix of this linear gradient brush.

LinearGradientBrush::SetWrapMode

The LinearGradientBrush::SetWrapMode method sets the wrap mode of this linear gradient brush.

LinearGradientBrush::TranslateTransform

The LinearGradientBrush::TranslateTransform method updates this brush's current transformation matrix with the product of itself and a translation matrix.

 

 

 

Send comments about this topic to Microsoft

Build date: 3/6/2012

Community Additions

ADD
Show: