Class TSpriteBox (unit Spritebx)

Inherits from

TCustomControl

Constructors


constructor Create(AOwner: TComponent);

public declarations


Functions

destructor Destroy;


procedure DrawSprite;

copy backgnd1 to backgnd2

function GetPalette: HPALETTE;

protected declarations

always call the inherited Loaded first!


procedure HasChanged(Sender: TObject);


procedure Paint;

Not our window that was resized

procedure DrawBMP;

select brush and paint color band

procedure GradientFill(Color1, Color2: TColor);


procedure Loaded;


procedure SetAfterSprtMove(Value: TNotifyEvent);


procedure SetBeforeSprtMove(Value: TNotifyEvent);


procedure SetCenter(Value: boolean);


procedure SetColor(Value: TColor);

Copy BackGnd image data from source bitmap

procedure SetGradient(Value: boolean);


procedure SetImage(AImage: TBitmap);


procedure SetStretch(Value: boolean);


procedure WMSize(var Message: TWMSize);

Trap the Windows message requesting our size change, let it, then redraw

Properties

property AfterSprtMove : TNotifyEvent


property Align :


property BeforeSprtMove : TNotifyEvent


property Center : boolean


property Color : TColor


property Gradient : boolean


property Image : TBitmap

published declarations

property Stretch : boolean


property Visible :


property BackGnd1 : TBitmap


property BackGnd2 : TBitmap


Events

event OnClick :


Variables

FAfterSprtMove : TNotifyEvent;


FBackGnd1 : TBitMap;


FBackGnd2 : TBitMap;


FBeforeSprtMove : TNotifyEvent;


FCenter : boolean;


FColor : TColor;


FGradient : boolean;


FImage : TBitMap;

private declarations

FStretch : boolean;



Constructors


constructor Create(AOwner: TComponent);

public declarations


Functions


destructor Destroy;


procedure DrawSprite;

copy backgnd1 to backgnd2


function GetPalette: HPALETTE;

protected declarations

always call the inherited Loaded first!


procedure HasChanged(Sender: TObject);


procedure Paint;

Not our window that was resized


procedure DrawBMP;

select brush and paint color band


procedure GradientFill(Color1, Color2: TColor);


procedure Loaded;


procedure SetAfterSprtMove(Value: TNotifyEvent);


procedure SetBeforeSprtMove(Value: TNotifyEvent);


procedure SetCenter(Value: boolean);


procedure SetColor(Value: TColor);

Copy BackGnd image data from source bitmap


procedure SetGradient(Value: boolean);


procedure SetImage(AImage: TBitmap);


procedure SetStretch(Value: boolean);


procedure WMSize(var Message: TWMSize);

Trap the Windows message requesting our size change, let it, then redraw


Properties


property AfterSprtMove : TNotifyEvent


property Align :


property BeforeSprtMove : TNotifyEvent


property Center : boolean


property Color : TColor


property Gradient : boolean


property Image : TBitmap

published declarations


property Stretch : boolean


property Visible :


property BackGnd1 : TBitmap


property BackGnd2 : TBitmap


Events


event OnClick :


Variables


FAfterSprtMove : TNotifyEvent;


FBackGnd1 : TBitMap;


FBackGnd2 : TBitMap;


FBeforeSprtMove : TNotifyEvent;


FCenter : boolean;


FColor : TColor;


FGradient : boolean;


FImage : TBitMap;

private declarations


FStretch : boolean;