Buscar

Desenhando texto 3d no form com canvas

Código

//Antes vc deve declarar esa procedure na seção private

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;
 

//Exemplo:

procedure TForm1.Button1Click(Sender: TObject);
begin
imgPaintCanvas(Form1.Canvas, 'www.delphi.eti.br', 10, 6, 4);
end;

Publicidade

Vote na dica




Quantidade de votos: 0 votos
Aceitação: 0%


Detalhes da dica

Categoria: Forms
Adicionada dia: 11/02/04
Por: Emir Teófilo Calife Neto
Visualizada: 2466 vezes

Planeta Delphi - Tudo sobre programação Delphi Planeta Delphi - www.planetadelphi.com.br - Todos os direitos reservados | Copyright 2001-2009