I've already experimented with textWidth() but cannot seem to find a function for checking the height of a char or String. What I'm trying to do is draw a rectangle the same size as the text, filled and unfilled.
Can anyone help me, please.
[edit] I have worked out that I can base the height of the text on the width of the letter "M" but I'm not sure if it will work for all font sizes. [/edit]
[edit] It's OK, I think I've solved it now. textAscent() seems to do the trick. [/edit]
Can anyone help me, please.
[edit] I have worked out that I can base the height of the text on the width of the letter "M" but I'm not sure if it will work for all font sizes. [/edit]
[edit] It's OK, I think I've solved it now. textAscent() seems to do the trick. [/edit]
1