Computer Science Canada Font.Draw on an array |
Author: | adhanjal [ 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? |
Author: | Tony [ 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! |
Author: | adhanjal [ 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? |
Author: | Aange10 [ 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. |
Author: | Tony [ Mon Jan 16, 2012 9:30 pm ] |
Post subject: | RE:Font.Draw on an array |
it's fairly simple to do with Font.Width |