Text orientation

I want to print a number '10' on a form canvas. I wish to it to be rotated 90 degree.

How can I do this?

PeterShaw
petershaw8Asked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
kretzschmarConnect With a Mentor Commented:
or from borland,
(just the same)

Creating a rotated font. - by Borland Developer Support Staff



 Question and Answer Database

FAQ615D.txt   Creating a rotated font.
Category   :Windows API
Platform    :All
Product    :All 32 bit  

Question:
How do I create a rotated font?


Answer:
Rotating fonts is a straight forward process, so long as the Windows
font mapper can supply a rotated font based on the font you request.
Note: Using a TrueType font virturally guarantees success.

Here is an example of creating a font that is rotated 45 degrees:

procedure TForm1.Button1Click(Sender: TObject);
var
  lf : TLogFont;
  tf : TFont;
begin
  with Form1.Canvas do begin
    Font.Name := 'Arial';
    Font.Size := 24;
    tf := TFont.Create;
    tf.Assign(Font);
    GetObject(tf.Handle, sizeof(lf), @lf);
    lf.lfEscapement := 450;
    lf.lfOrientation := 450;
    tf.Handle := CreateFontIndirect(lf);
    Font.Assign(tf);
    tf.Free;
    TextOut(20, Height div 2, 'Rotated Text!');
  end;
end;


7/16/98 4:31:28 PM
 
meikl ;-)
0
 
kretzschmarCommented:
0
 
gemartiCommented:
Or you could buy Raize Components.

http:\\www.raize.com
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
YodaMageCommented:
Or you could use the woll2woll 1st Class component TfcLabel
0
 
kretzschmarCommented:
or you could rotate your monitor on the side :-))
no code needed
0
 
gemartiCommented:
hmmmm...why not draw your form on a piece of paper with the label exactly the way you want it.. Make several copies and distribute them to your customers?  Instructions would read...

Past on screen to use.

  :)


0
 
YodaMageCommented:
With that in mind:

Type up label
Scan
Rotate image 90 degrees in editor
Slap TImage on form

: )
0
 
gemartiCommented:
I guess this q is degenerating pretty quick. No?

I'd say meikl  got the q. What do you say YodaMage?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.