Re: JSUI-MGraphics patch-a-day

Darwin Grosse

Here is the patch for November 30, 2011:

Alas, we hit the end of the road. In this ditty, we do a bit of javascript coding to perform a word-wrap on my heartfelt goodbye. Change the font or the font size and the text should wrap accordingly. This uses the text_measure() function to get the width of a string, then back-pedal if we’ve gone too far.

Not the most elegant wordwrap function ever written, but you get the idea.

I hope you’ve enjoyed the series, and find the mgraphics system to your liking!

Nov 30, 2011 at 7:08pm #215002