Method function IGDIPlus.IGPLinearGradientBrush.SetBlendBellShape(Single;Single) : TGPLinearGradientBrush

From Mitov Wiki Doc
Jump to: navigation, search

This is a Beta Read Only version of this page. Please review and send recommendations to mitov@mitov.com. We will enable the editing as soon as we are happy with the overall Wiki site.

Class: IGPLinearGradientBrush

Contents

Syntax

Delphi:

function SetBlendBellShape( focus : Single, scale : Single ) : TGPLinearGradientBrush;

C++ Builder:

TGPLinearGradientBrush __fastcall SetBlendBellShape( float focus, float scale );

Visual C++ (MFC):

SetBlendBellShape(  focus,  scale );

Summary

Sets the blend shape of this linear gradient brush to create a custom blend based on a bell-shaped curve.

Description

Call this method to set the blend shape of this linear gradient brush to create a custom blend based on a bell-shaped curve.


Remarks By default, the color changes gradually from the starting color (color at the starting boundary of the linear gradient brush) to the ending color (color at the ending boundary of the linear gradient brush) as you move from the starting boundary to the ending boundary. You can customize the positioning and blending of the starting and ending colors by using the TGPLinearGradientBrush.SetBlendBellShape method.


The TGPLinearGradientBrush.SetBlendBellShape method customizes the blend so that it follows a bell-shaped curve with the extremes of the bell's base at the gradient's boundaries. The starting color, which, in a default blend, is at the starting boundary of a linear gradient brush, appears at the starting and ending boundaries of the linear gradient brush when a bell-shaped blend is applied. The position of the ending color, which, in a default blend, is at the ending boundary, is somewhere between the boundaries and is determined by the value of the focus. In other words, the focus specifies the position of the peak of the bell. For example, a focus value of 0.7 places the peak at 70 percent of the distance between the starting and ending boundaries. The ending color appears at this peak.


The ending color in a bell-shaped blend is a percentage of the gamut between the gradient's default-blend starting color and default-blend ending color. For example, suppose a linear gradient brush is constructed with red as the starting color and blue as the ending color. If TGPLinearGradientBrush.SetBlendBellShape is called with a scale value of 0.8, the ending color in the bell shaped blend is a hue that is 80 percent between red and blue (20 percent red, 80 percent blue). A scale value of 1.0 produces an ending color that is 100 percent blue.

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox