Android: Adds a work around for the too small text measuring

git-svn-id: trunk@34401 -
This commit is contained in:
sekelsenmat 2011-12-25 09:28:12 +00:00
parent d84fb4ec3e
commit eed671d9e8

View File

@ -161,6 +161,8 @@ public class LCLActivity extends Activity
localpaint.setTextSize(lcltextsize);
localpaint.getTextBounds(lcltext, 0, lcltext.length(), localbounds);
lclwidth = localbounds.width();
// Painter.getTextBounds consistently gives us a too small size, so work around that
lclwidth = lclwidth + (3 * lcltextsize) / 16;
// Don't use just localbounds.height() from the source text
// because it will calculate the minimum necessary height,
// but we can't easily use that to draw text because it draws relative to the baseline