Solved

Text orientation

Posted on 2001-08-02
8
645 Views
Last Modified: 2007-12-19
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
0
Comment
Question by:petershaw8
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
8 Comments
 
LVL 27

Expert Comment

by:kretzschmar
ID: 6344219
0
 
LVL 27

Accepted Solution

by:
kretzschmar earned 100 total points
ID: 6344222
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
 
LVL 21

Expert Comment

by:gemarti
ID: 6344271
Or you could buy Raize Components.

http:\\www.raize.com
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 4

Expert Comment

by:YodaMage
ID: 6345315
Or you could use the woll2woll 1st Class component TfcLabel
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 6345715
or you could rotate your monitor on the side :-))
no code needed
0
 
LVL 21

Expert Comment

by:gemarti
ID: 6346066
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
 
LVL 4

Expert Comment

by:YodaMage
ID: 6346250
With that in mind:

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

: )
0
 
LVL 21

Expert Comment

by:gemarti
ID: 6346737
I guess this q is degenerating pretty quick. No?

I'd say meikl  got the q. What do you say YodaMage?
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question