PDA

Ver la Versión Completa : Girar un texto o imagen para imprimirlo


dec
30-06-2006, 23:01:14
Como girar un texto o imagen para imprimirlo


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.