Mirror

Display text in any angle (Views: 100)


Problem/Question/Abstract:

Display text in any angle

Answer:

The following works only with TrueType fonts:


var
  LogFont: TLogFont;
  ...
    GetObject(Canvas.Font.Handle, SizeOf(TLogFont), @LogFont);
  // in 1/10 degrees, 450 = 45 degrees
  LogFont.lfEscapement := Angle * 10;
  Canvas.Font.Handle := CreateFontIndirect(LogFont);

<< Back to main page