SPECIAL OFFER        Order and save right now!
20% off with the 729824315 dicscount code for Ultimate Pack and any another product for Delphi from Greatis Programming!

⤷ Set rotated text

Use TLOGFONT structure for creating new font. For rotating text you must change lfEscapement and lfOrientation fields of this structure.

procedure TForm1.Button1Click(Sender: TObject);
var
  MyLogFont: TLogFont;
  MyFont: HFont;
begin
  FillChar(MyLogFont, Sizeof(MyLogFont), 0);
  with MyLogFont do
  begin
    lfHeight:=0;
    lfWidth:=0;
    lfEscapement:=StrToInt(Edit1.Text);
    lfOrientation:=StrToInt(Edit1.Text);
    lfWeight:=FW_NORMAL;
    lfItalic:=1;
    lfUnderline:=1;
    lfStrikeOut:=0;
    lfCharSet:=DEFAULT_CHARSET;
    lfOutPrecision:=OUT_DEFAULT_PRECIS;
    lfClipPrecision:=CLIP_DEFAULT_PRECIS;
    lfQuality:=DEFAULT_QUALITY;
    lfPitchAndFamily:=1;
  end;
  MyFont:=CreateFontIndirect(MyLogFont);
  Form1.Canvas.Font.Handle:=MyFont;
  Form1.Canvas.TextOut(100, 100, 'Hello');
end;
More for developers
Databases for Amazon Associates
Amazon Categories
Amazon Nodes