Foros Club Delphi

Foros Club Delphi (https://www.clubdelphi.com/foros/index.php)
-   Trucos (https://www.clubdelphi.com/foros/forumdisplay.php?f=52)
-   -   Girar un texto o imagen para imprimirlo (https://www.clubdelphi.com/foros/showthread.php?t=80620)

dec 30-06-2006 23:01:14

Girar un texto o imagen para imprimirlo
 
Como girar un texto o imagen para imprimirlo

Código Delphi [-]
procedure TForm1.Button1Click(Sender: TObject);
var
   LogRec: TLOGFONT;
   OldFont,NewFont: HFONT;
   i, X, Y: LongInt;

begin
  if pdPrinter.Execute then begin
    with Printer do begin
      GetObject(Canvas.Font.Handle, SizeOf(LogRec), @LogRec);
      BeginDoc;
      for i := 0 to 5 do begin
        LogRec.lfEscapement := (i * 60)*10;
        LogRec.lfOutPrecision := OUT_TT_ONLY_PRECIS;
        LogRec.lfFaceName := 'Times New Roman';
        NewFont := CreateFontIndirect(LogRec);
        OldFont := SelectObject(Canvas.Handle,NewFont);
        Canvas.TextOut(100, 100, 'Hello World!');
        NewFont := SelectObject(Canvas.Font.Handle,OldFont);
        DeleteObject(NewFont);
      end; { for }
      EndDoc;
    end;
  end;
end.


La franja horaria es GMT +2. Ahora son las 15:02:18.

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