unit Unit1;
{$mode objfpc}{$H+}
interface
uses
Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs,
BGRABitmap, BGRAWinBitmap, BGRABitmapTypes, BGRAGradientScanner, BGRATextFX,
BGRAText;
type
{ TForm1 }
TForm1 = class(TForm)
procedure FormPaint(Sender: TObject);
private
{ private declarations }
public
{ public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.lfm}
{ TForm1 }
procedure TForm1.FormPaint(Sender: TObject);
var
bmp1,bmp2: TBGRACustomBitmap;
txt: String;
begin
txt:= 'TextShadow!';
// Simple Shadow
bmp1:= TextShadow(200,40,txt,32,BGRAWhite,BGRABlack,1,1);
bmp1.Draw(Canvas,0,0,False);
bmp1.Free;
// Blured Shadow
bmp1:= TextShadow(200,40,txt,32,BGRABlack,BGRA(128,128,255,255),4,4,5);
bmp1.Draw(Canvas,0,40,False);
bmp1.Free;
// Neon Shadow ''(better with Black background)''
bmp1:= TextShadow(200,40,txt,32,BGRA(255,255,255,200),BGRA(0,255,0,255),0,0,5);
bmp1.Draw(Canvas,0,80,False);
bmp1.Free;
// Multi Shadow
bmp1:= TextShadow(250,50,txt,32,BGRAWhite,BGRA(255,0,0,255),-5,-5,4,[fsBold,fsUnderline],'Tahoma',False);
bmp2:= TextShadow(250,50,txt,32,BGRAWhite,BGRA(0,0,255,255),5,5,4,[fsBold,fsUnderline],'Tahoma',True);
bmp1.PutImage(0,0,bmp2,dmDrawWithTransparency);
bmp1.Draw(Canvas,0,120,False);
bmp1.Free;
bmp2.Free;
end;
end.