Foros Club Delphi

Foros Club Delphi (https://www.clubdelphi.com/foros/index.php)
-   Trucos (https://www.clubdelphi.com/foros/forumdisplay.php?f=52)
-   -   Imprimir un texto en vertical (https://www.clubdelphi.com/foros/showthread.php?t=80600)

Neftali [Germán.Estévez] 30-06-2006 17:57:24

Imprimir un texto en vertical
 
¿Cómo imprimir un texto vertical?

Código Delphi [-]
procedure AngleTextOut(CV: TCanvas; const sText: String; x, y, angle:integer);
var
   LogFont: TLogFont;
   SaveFont: TFont;
begin
     SaveFont := TFont.Create;
     SaveFont.Assign(CV.Font);
     GetObject(SaveFont.Handle, sizeof(TLogFont), @LogFont);
     with LogFont do begin
          lfEscapement := angle *10;
          lfPitchAndFamily := FIXED_PITCH or FF_DONTCARE;
     end; {with}
     CV.Font.Handle := CreateFontIndirect(LogFont);
     SetBkMode(CV.Handle, TRANSPARENT);
     CV.TextOut(x, y, sText);
     CV.Font.Assign(SaveFont);
     SaveFont.Free;
end;


La franja horaria es GMT +2. Ahora son las 10:38:15.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi