Class TGradientFill (unit Gfvcl16)

Inherits from

TGraphicControl

Constructors


constructor Create(AOwner: TComponent);

TGradientFill } { Override the constructor to initialize variables


Functions

destructor Destroy;

Override the destructor to clean up

procedure ReRealize(OrigWnd: hWnd);

Method to Re-Realize the Palette

procedure MakePalette(BeginRed, BeginGreen, BeginBlue: Byte; RedDifference, GreenDifference, BlueDifference: Integer);

Build the Palette

procedure Paint;

Perform the fill when paint is called

procedure GradientFill;

Fill procedure

Gradient fill procedure - the actual routine


procedure SetAutoSize(Value: Boolean);

Repaint the screen upon a resize

procedure SetBeginColor(Value: TColor);

Set begin color when property is changed

procedure SetEndColor(Value: TColor);

Set end color when property is changed

procedure SetFillDirection(Value: TFillDirection);

Used to store Palette created with LogPal} { Procedures for setting property values

Set the fill direction


procedure SetHoldRedraw(Value: Boolean);

Set the HoldRedraw property

procedure SetNumberOfColors(Value: TNumberOfColors);

Set the number of colors to be used in the fill

procedure SetRealize(Value: Boolean);

Use a Realized Palette if True

Properties

property About : TGFAboutBox

AboutBox

property Align :

Enable standard properties

property AutoSize : Boolean

Repaint when autosized

property BeginColor : TColor

Starting color of fill

property DragCursor :


property DragMode :


property Enabled :


property EndColor : TColor

Ending color of fill

property FillDirection : TFillDirection

Direction of fill

property HoldRedraw : Boolean

Property to determine if redraw should be done or not.

property NumberOfColors : TNumberOfColors

Number of colors to use in the fill (1 - 256) - default is 16.

property ParentShowHint :


property PopupMenu :


property Realize : Boolean

Use a Realized Palette if True

property ShowHint :


property Visible :


property PaletteHandle : HPalette


property Picture : TBitmap


Events

event OnClick :


event OnDblClick :


event OnDragDrop :


event OnDragOver :


event OnEndDrag :


event OnMouseDown :


event OnMouseMove :


event OnMouseUp :


Variables

FAutoSize : Boolean;


FBeginColor : TColor;


FDirection : TFillDirection;

Variables for properties

FEndColor : TColor;


FGFAbout : TGFAboutBox;


FHoldRedraw : Boolean;


FLogPal : PLogPalette;


FNumberOfColors : TNumberOfColors;


FNumColors : TNumberOfColors;


FPalette : HPalette;

Used to calculate memory to allocate for TLogPalette

FPalSize : LongInt;

Pointer to a TLogPalette

FPicture : TBitmap;


FRealize : Boolean;



Constructors


constructor Create(AOwner: TComponent);

TGradientFill } { Override the constructor to initialize variables


Functions


destructor Destroy;

Override the destructor to clean up


procedure ReRealize(OrigWnd: hWnd);

Method to Re-Realize the Palette


procedure MakePalette(BeginRed, BeginGreen, BeginBlue: Byte; RedDifference, GreenDifference, BlueDifference: Integer);

Build the Palette


procedure Paint;

Perform the fill when paint is called


procedure GradientFill;

Fill procedure

Gradient fill procedure - the actual routine


procedure SetAutoSize(Value: Boolean);

Repaint the screen upon a resize


procedure SetBeginColor(Value: TColor);

Set begin color when property is changed


procedure SetEndColor(Value: TColor);

Set end color when property is changed


procedure SetFillDirection(Value: TFillDirection);

Used to store Palette created with LogPal} { Procedures for setting property values

Set the fill direction


procedure SetHoldRedraw(Value: Boolean);

Set the HoldRedraw property


procedure SetNumberOfColors(Value: TNumberOfColors);

Set the number of colors to be used in the fill


procedure SetRealize(Value: Boolean);

Use a Realized Palette if True


Properties


property About : TGFAboutBox

AboutBox


property Align :

Enable standard properties


property AutoSize : Boolean

Repaint when autosized


property BeginColor : TColor

Starting color of fill


property DragCursor :


property DragMode :


property Enabled :


property EndColor : TColor

Ending color of fill


property FillDirection : TFillDirection

Direction of fill


property HoldRedraw : Boolean

Property to determine if redraw should be done or not. This allows multiple changes to be made without redrawing the Gradient Fill


property NumberOfColors : TNumberOfColors

Number of colors to use in the fill (1 - 256) - default is 16. If 1 } { then it uses the Begin Color.


property ParentShowHint :


property PopupMenu :


property Realize : Boolean

Use a Realized Palette if True


property ShowHint :


property Visible :


property PaletteHandle : HPalette


property Picture : TBitmap


Events


event OnClick :


event OnDblClick :


event OnDragDrop :


event OnDragOver :


event OnEndDrag :


event OnMouseDown :


event OnMouseMove :


event OnMouseUp :


Variables


FAutoSize : Boolean;


FBeginColor : TColor;


FDirection : TFillDirection;

Variables for properties


FEndColor : TColor;


FGFAbout : TGFAboutBox;


FHoldRedraw : Boolean;


FLogPal : PLogPalette;


FNumberOfColors : TNumberOfColors;


FNumColors : TNumberOfColors;


FPalette : HPalette;

Used to calculate memory to allocate for TLogPalette


FPalSize : LongInt;

Pointer to a TLogPalette


FPicture : TBitmap;


FRealize : Boolean;