|[Draw2D] How to strech label to "real" size of text? [message #247186]
||Sun, 08 February 2009 11:55
| Dénes Harmath
Registered: July 2009
I would like to stretch a label's bounds to fit the minimum enclosing
bounds of its text. To clarify the problem: for example, a single "a"
character's bounds span the whole ascent and descent of the font (so that
even a "b" or "g" would fit in it), even though the character "a" does not
reach either the ascender or the descender line. How could this be solved?
I tried Label.getTextBounds(), Label.getBounds(),
TextUtilities.getTextExtents() but all return the wrong bounding box.
Thanks in advance
Powered by FUDForum
. Page generated in 0.03163 seconds