DELPHI技术

博客园 首页 新随笔 联系 订阅 管理
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;
     try
       tf.Assign(Font) ;
       GetObject(tf.Handle, sizeof(lf), @lf) ;
       lf.lfEscapement := 450;
       lf.lfOrientation := 450;
       tf.Handle := CreateFontIndirect(lf) ;
       Font.Assign(tf) ;
     finally
       tf.Free;
     end;
     TextOut(20, Height div 2, 'Rotated Text!') ;
   end;
end;
posted on 2005-11-21 19:22  DELPHI技术  阅读(436)  评论(0编辑  收藏  举报