Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Basic Realbasic > Re: Rotated Tex...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 2 of 2 Topic 3258 of 3326
Post > Topic >>

Re: Rotated Text

by Joe Strout <joe@[EMAIL PROTECTED] > Sep 9, 2007 at 09:08 PM

In article <Xns99A6A7ECF2574dalearendssbcglobal@[EMAIL PROTECTED]
>,
 Dale Arends <dalearendssafe@[EMAIL PROTECTED]
> wrote:

> I am putting together a small (I hope!) application to print book
covers.  
> I want the title and other information to print rotated on the spine but

> can't seem to figure out how to rotate a control.

You can't rotate a control.  But you can rotate a StringShape (in code).  
Something like this (off the top of my head, chase down any errors the 
compiler points out):

 Dim ss As New StringShape
 ss.Text = "Hello World!"
 ss.Rotation = 3.14157 / 2  // i.e. 90 degrees
 g.DrawString ss, 100, 100

Put the above in the Paint event of a canvas (that's about 200 pixels on 
a side) and you should see what's going on.  Then modify it to suit your 
needs.

However, since you're ultimately going to print this, you may run into 
some additional problems.  Printing on the Mac still goes through 
QuickDraw, IIRC, and QuickDraw doesn't have any facility for 
representing rotated text.  So the text will be pixelated when it comes 
out at whatever the resolution of the printer context is -- 72 dpi by 
default.  You'll need to work around this by setting the printer context 
to a much higher resolution, and drawing your text much larger.

But take it one step at a time, and post again when you get stuck!

Best,
- Joe

-- 
"Polywell" fusion -- an approach to nuclear fusion that might actually
work.
Learn more and discuss via: 
<http://www.strout.net/info/science/polywell/>
 




 2 Posts in Topic:
Rotated Text
Dale Arends <dalearend  2007-09-09 18:31:45 
Re: Rotated Text
Joe Strout <joe@[EMAIL  2007-09-09 21:08:25 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Jul 26 2:52:11 CDT 2008.