Draw text vertivally on canvas lazarus / 8-Other ---------------------------------------------------------------------- mitevski · 2008-12-22 19:22 Hi, all! It is possible in tcanvas to draw text, oriented vertically? without using some platform specific code? Thanks. ---------------------------------------------------------------------- Paul Ishenin · 2008-12-25 02:33 It is possible but not with gtk1: Code: [Select]        OldFont := 0;         if GetObject(ACanvas.Font.Reference.Handle, SizeOf(ALogFont), @ALogFont) <> 0 then         begin           ALogFont.lfEscapement := 900;           RotatedFont := CreateFontIndirect(ALogFont);           if RotatedFont <> 0 then             OldFont := SelectObject(ACanvas.Handle, RotatedFont);         end;         TextOut(ACanvas.Handle, DrawRect.Left, DrawRect.Bottom, PChar(ACaption), Length(ACaption));         if OldFont <> 0 then           DeleteObject(SelectObject(ACanvas.Handle, OldFont)); ---------------------------------------------------------------------- Phil · 2008-12-25 17:54 The Orpheus TOvcRotatedLabel control does what you want: http://wiki.lazarus.freepascal.org/OrphPort As noted, GTK does not support rotated text, although GTK2 does (as does win32, carbon, qt). Thanks. -Phil ---------------------------------------------------------------------- mitevski · 2008-12-25 21:04 Thanks! It works ---------------------------------------------------------------------- Vincent Snijders · 2008-12-25 21:36 Why doesn't TFont have a Orientation or Escapement or Angle property? ---------------------------------------------------------------------- Paul Ishenin · 2008-12-25 23:37 QuoteWhy doesn't TFont have a Orientation or Escapement or Angle property?Because you had not added it there. ---------------------------------------------------------------------- Phil · 2008-12-26 20:56 Quote from: Vincent Snijders on December 25, 2008, 10:36:12 pmWhy doesn't TFont have a Orientation or Escapement or Angle property? I think rotating depended on TrueType fonts, so maybe TFont only has properties common to most fonts. I believe several TrueType fonts were included with Windows 3.1 (and thus available in Delphi 1), but the default font used in Delphi has generally not been a TrueType font. Thanks. -Phil