Search results for 'Rotated Text Drawing'. 1 post(s) found.

  1. 2007/09/11 How to draw rotated text
2007/09/11 07:47

How to draw rotated text


How to draw rotated text
This example creates a rotated font and displays it on the form by assigning the handle of the rotated to the Form’s Canvas Font via the Font’s Handle property. Rotating fonts is a straightforward process, so long as the Windows Font Mapper can supply a rotated font based on the font you request.

If you are using a TrueType font there is virtually no reason for failure.

var
   lf: LOGFONT; // Windows native font structure
begin
   Canvas.Brush.Style := bsClear; // set the brush style to transparent
   FillChar(Addr(lf), SizeOf(lf), Byte(0)) ;
   lf.lfHeight := 20;
   lf.lfEscapement := 10 * 45; // degrees to rotate
   lf.lfOrientation := 10 * 45;
   lf.lfCharSet := DEFAULT_CHARSET;
   StrCpy(lf.lfFaceName, 'Tahoma') ;

   Canvas.Font.Handle := CreateFontIndirect(Addr(lf)) ;

   Canvas.TextOut(10, 100, 'Rotated text') ; // output the rotated font
end;
Trackback 3 Comment 0

Trackback : Cannot send a trackbact to this post.

  1. Subject different money making ideas

    Tracked from moneyideas 2010/01/29 05:25 delete

    moneyideas

  2. Subject different money making ideas

    Tracked from moneyideas 2010/01/29 14:10 delete

    moneyideas

  3. Subject different money making ideas

    Tracked from moneyideas 2010/01/31 16:39 delete

    moneyideas