writing text at an angle

writing text at an angle

Post by Manajit Rat » Mon, 07 Sep 1998 04:00:00



dear group,

how can i write text at an angle on a canvas using textout or any other
way.

will be indebted if anyone can help.

thanx

 
 
 

writing text at an angle

Post by Kurt Barthelmess (Tea » Mon, 07 Sep 1998 04:00:00


You'll need to go to the Windows API, and the CreateFontIndirect
routine. Look at the nEscapement and nOrientation fields of the
LOGFONT (TLogFont in Delphi) structure to see how to set up the
rotation.

Note that this generally only works with TrueType fonts.

Good luck.

Kurt

 
 
 

writing text at an angle

Post by Earl F. Glyn » Mon, 07 Sep 1998 04:00:00



>dear group,

>how can i write text at an angle on a canvas using textout or any other
>way.

>will be indebted if anyone can help.

>thanx

See the Inprise Q&A "Create a rotated font"
http://www.inprise.com/devsupport/delphi/qanda/708.html

efg
_________________________________________
efg's Computer Lab:  http://infomaster.net/external/efg


MedTech Research Corporation, Lenexa, KS  USA

 
 
 

writing text at an angle

Post by Ian Bakke » Wed, 09 Sep 1998 04:00:00


Try this code:

procedure TForm1.AngleTextOut(const sText: String;x, y,angle:integer);
var
  LogFont: TLogFont;
  OldFont,NewFont : hFont;
begin

  with LogFont do
  begin
    lfEscapement:= angle;
    lfQuality:=PROOF_QUALITY;
  end;
  NewFont:=CreateFontIndirect(LogFont);
  OldFont := SelectObject(Canvas.Handle, NewFont);
  SetBkMode(Canvas.Handle, TRANSPARENT);
  Windows.TextOut(Canvas.Handle,x,y, PChar(sText), Length(sText));
  SelectObject(Canvas.Handle, OldFont);
  DeleteObject(NewFont);
end;

 
 
 

1. How to write text angle on printer canvas

Hi.
I need to write text with angles on printer.
I use SetTextAngle to do in on a screen canvas but it does'nt work on a
printer canvas.
Does anyone know how to write text with angles on a printer.

Thanks
Aviran

2. WANTED: VRML to POV-Ray Translator

3. Help: writing text to window--controlling text size

4. Chinese on Corel 8

5. Text at right angles

6. glutInit?

7. Graphical text and angle

8. Turbo C and text at an angle ?

9. Angled text

10. Drawing Text at an angle WITH a character underlined

11. Print Text at Angles