Solved

Text orientation

Posted on 2001-08-02
8
648 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Delphi selector screen 2 97
Convert a string into a TDateTime 5 80
can't find the executable in Simulator 1 130
scroll down TListBox component in Delphi 1 44
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…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

751 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