LinearGradientBrush::SetBlendTriangularShape Method (Single)

 

Creates a linear gradient with a center color and a linear falloff to a single color on both ends.

Namespace:   System.Drawing.Drawing2D
Assembly:  System.Drawing (in System.Drawing.dll)

public:
void SetBlendTriangularShape(
	float focus
)

Parameters

focus
Type: System::Single

A value from 0 through 1 that specifies the center of the gradient (the point where the gradient is composed of only the ending color).

This method specifies a focus, which is the point where the gradient is composed only of the ending color. The focus parameter represents a location as a proportion of the distance along the gradient line. The gradient falls off to the starting color linearly to either side.

For an example, see SetBlendTriangularShape.

.NET Framework
Available since 1.1
Return to top
Show: