Solved

Text orientation

Posted on 2001-08-02
8
638 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
  • 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
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

 
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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

808 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