Type
TForm1 = class(TForm)
private
procedure TForm1.imgPaintCanvas(TheCanvas : TCanvas; TheString : String;
TheFontSize, UCorner, LCorner : Integer);
public
{ Public declarations }
end; var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.imgPaintCanvas(TheCanvas : TCanvas; TheString : String;
TheFontSize, UCorner, LCorner : Integer);
Begin
TheCanvas.Brush.Style := bsClear;
TheCanvas.Font.Style := [fsBold];
TheCanvas.Font.Name := 'MS Sans Serif';
TheCanvas.Font.Size := TheFontSize;
TheCanvas.Font.Color := clBlack;
TheCanvas.TextOut(UCorner, LCorner, TheString);
TheCanvas.Font.Color := clGray;
TheCanvas.TextOut(UCorner - 1, LCorner - 1, TheString);
TheCanvas.Font.Color := clSilver;
TheCanvas.TextOut(UCorner - 2, LCorner - 2, TheString);
TheCanvas.Font.Color := clBlack;
TheCanvas.TextOut(UCorner - 3, LCorner - 3, TheString);
End;
Usa-se:
procedure TForm1.Button1Click(Sender: TObject);
begin
imgPaintCanvas(Form1.Canvas, 'Escreva um texto aqui!', 10, 6, 4);
end;
Assinar:
Postar comentários (Atom)
Nenhum comentário:
Postar um comentário