用法:TextOut(X, Y: Integer; const Text: string);X轴的:TextOut(20, Height div 2, 'Rotated Text!');Y轴的是你的Y保持不变,把X做操作;也就是TextOut(Left div 2,20 'Rotated Text!');

解决方案 »

  1.   

    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);
    lf.lfEscapement := 450;//与X轴的夹角
    lf.lfOrientation := 450;;//与Y轴的夹角
    tf.Handle := CreateFontIndirect(lf);
    Font.Assign(tf);
    tf.Free;
    TextOut(20, Height div 2, 'Rotated Text!');
    end;
    end; 
      

  2.   

    比如:与Y轴10度的角,与经X轴60度的角,lf.lfEscapement := 600;
    lf.lfOrientation :=100