Scalabium Software

SMReport Autogenerated

Knowledge for your independence.
Home Delphi and C++Builder tips



#2:How I can display the rotated text?

With next procedure you can display the text with any angle.

procedure AngleTextOut(ACanvas: TCanvas; Angle, X, Y: Integer; Str: string);
var
  LogRec: TLogFont;
  OldFontHandle,
  NewFontHandle: hFont;
begin
  GetObject(ACanvas.Font.Handle, SizeOf(LogRec), Addr(LogRec));
  LogRec.lfEscapement := Angle*10;
  NewFontHandle := CreateFontIndirect(LogRec);
  OldFontHandle := SelectObject(ACanvas.Handle, NewFontHandle);
  ACanvas.TextOut(X, Y, Str);
  NewFontHandle := SelectObject(ACanvas.Handle, OldFontHandle);
  DeleteObject(NewFontHandle);
end;

Angle is the angle of rotation in the degrees, clockwise.

If somebody know how display the rotated text with wordwrap property, then
send a sources or link to me.


PS: I hope that you not forget that on my site you can download a freeware
TAngleLabel component with correct layout and alignment calculations.
See also
 
Fast Document Viewer
Paradox Password Recovery
Excel Web-stream
Viewer for MS Outlook Messages
Mail parser (ActiveX)
Metafile Convert
SMImport suite
Clarion Viewer
Word Web-stream
DBExport tools
 
 
Contact to webmaster

 

Into technology and want to share it with your kids? If you are looking for children activities you can find it at the learning haven. With a variety of information on all kinds of topics like world maps and arts and crafts movement, there is almost nothing you can't learn about. Come visit now and show off you new knowledge.


Borland Software Code Gear Scalabium Delphi tips

Copyrightc 1998-2009, Scalabium Software. All rights reserved.
webmaster@scalabium.com

July 30, 1999

SMExport advertising