Buscar

Escrevendo um texto na diagonal usando o canvas.

Código

Procedure TForm1.Button1Click(Sender: TObject);
var
  lf : TLogFont;
  tf : TFont;
begin
  with Form1.Canvas do
  begin
    Font.Name := 'Arial';
    Font.Size := 24;
    tf := TFont.Create;
    tf.Assign(Font);
    GetObject(tf.Handle, sizeof(lf), @lf);
    //ao aumentar ou diminuir este valor a rotação do texto se altera
    lf.lfEscapement := 500;
    //
    lf.lfOrientation := 500;
    tf.Handle := CreateFontIndirect(lf);
    Font.Assign(tf);
    tf.Free;
    TextOut(100, Height div 2, 'Active Delphi');
  end;
end;

 
 

Publicidade

Vote na dica




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


Detalhes da dica

Categoria: Forms
Adicionada dia: 05/08/04
Por: João Kildare Da Silva Leite
Visualizada: 3593 vezes

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