Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 How do you center a Font.draw in the middle of the x - axis, (bottom middle)?
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
vdemons




PostPosted: Sun May 01, 2011 7:19 pm   Post subject: How do you center a Font.draw in the middle of the x - axis, (bottom middle)?

How do you center a Font.draw in the middle of the x - axis, (bottom middle)?
Sponsor
Sponsor
Sponsor
sponsor
Insectoid




PostPosted: Sun May 01, 2011 7:24 pm   Post subject: RE:How do you center a Font.draw in the middle of the x - axis, (bottom middle)?

If you know the average pixel width of a letter, you can estimate the width of the string, and then do something with the maxx command.

You can figure it out.
Raknarg




PostPosted: Sun May 01, 2011 7:31 pm   Post subject: RE:How do you center a Font.draw in the middle of the x - axis, (bottom middle)?

By putting it there. The x position would be maxx div 2, then subtract a bit to get it completely in the middle.
vdemons




PostPosted: Sun May 01, 2011 7:53 pm   Post subject: RE:How do you center a Font.draw in the middle of the x - axis, (bottom middle)?

Thank you Insectoid & Raknarg
vdemons




PostPosted: Sun May 01, 2011 7:54 pm   Post subject: RE:How do you center a Font.draw in the middle of the x - axis, (bottom middle)?

very helpful
chrisbrown




PostPosted: Sun May 01, 2011 9:01 pm   Post subject: Re: How do you center a Font.draw in the middle of the x - axis, (bottom middle)?

Also Font.Width
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 6 Posts ]
Jump to:   


Style:  
Search: