Unit Gradient

--------------------------------------------------------- GradientFill Component, written by William Yang. yang@btinternet.com http://www.btinternet.com/~yang/ ---------------------------------------------------------

Classes

TDfGradient -
TGradient -

Functions

CustomGradient -
EllipseGradient -
FastLineGrad -
LineGradient - Paint the gradient fill as a bitmap pattern
PaintGradient -
RectGradient -

Types

TColorCount
TDirection
TDrawRectEvent
TGradientStyle

Constants

Variables


Functions


procedure CustomGradient(Canvas: TCanvas; Rect: TRect; Colors: array of TColor; ColorCount: Integer; LineSize: Integer; OnDraw: TDrawRectEvent);


procedure EllipseGradient(Canvas: TCanvas; Rect: TRect; Colors: array of TColor; ColorCount: Integer; LineSize: Integer);


procedure FastLineGrad(Canvas: TCanvas; Rect: TRect; Colors: array of TColor; ColorCount: Integer; Direction: TDirection; LineSize: Integer);


procedure LineGradient(Canvas: TCanvas; Rect: TRect; Colors: array of TColor; ColorCount: Integer; Direction: TDirection; LineSize: Integer);

Paint the gradient fill as a bitmap pattern

procedure PaintGradient(Canvas: TCanvas; Rect: TRect; Gradient : TGradient);


procedure RectGradient(Canvas: TCanvas; Rect: TRect; Colors: array of TColor; ColorCount: Integer; LineSize: Integer);


Types


TColorCount=1..4

TDirection=(diHorizonal, diVertical);

TDrawRectEvent = procedure (Sender: TObject; Canvas: TCanvas; Rect: TRect) of object

TGradientStyle=(gsLine, gsEllipse, gsRect, gsCustomRect);

Constants


Variables