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

Username:   Password: 
 RegisterRegister   
 Font.Draw on an array
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
adhanjal




PostPosted: Mon Jan 16, 2012 9:19 pm   Post subject: Font.Draw on an array

I know how to apply Font.Draw to an array but I'm wondering how to make the lines break normally (as they would using put). Is this possible?
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Mon Jan 16, 2012 9:22 pm   Post subject: RE:Font.Draw on an array

you're in control of x/y co-ordinates of Font.Draw -- you can make it draw where-ever you want. Even on a new line! Wink
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
adhanjal




PostPosted: Mon Jan 16, 2012 9:24 pm   Post subject: RE:Font.Draw on an array

Sorry, I should've been more clear. I'm reading text from a file which in turn is being put into an array. The length of each string being put into the array, however, is different on a line-per-line basis. How do I ensure that the text doesn't get cut off and goes to the next line like normal?
Aange10




PostPosted: Mon Jan 16, 2012 9:28 pm   Post subject: RE:Font.Draw on an array

Firstly

Quote:

Is this possible?


Of course.

Better question:

Better Question wrote:

Is this easy?


probably not.


If you want it to cut off at a certain point, then do just that. For instance, you can track where each character would be at on the screen, and when it is at the end, have another statement to draw it on a new line.

It would just require ingenuity.
Tony




PostPosted: Mon Jan 16, 2012 9:30 pm   Post subject: RE:Font.Draw on an array

it's fairly simple to do with Font.Width
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
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  [ 5 Posts ]
Jump to:   


Style:  
Search: