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
image: TBGRABitmap;
txt: TBGRACustomBitmap;
c: TBGRAPixel;
begin
image := TBGRABitmap.Create(ClientWidth, ClientHeight, ColorToBGRA(ColorToRGB(clBtnFace)) );
c := ColorToBGRA(ColorToRGB(clBtnText));
txt := TextShadow(ClientWidth, ClientHeight, '您好,中国!', 30, c, BGRABlack, 5, 5, 5);
image.PutImage(0,0,txt,dmDrawWithTransparency);
txt.Free;
image.Draw(Canvas,0,0,True);
image.free;
end;
end.