mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-29 08:34:37 +01:00
When drawing letters raise baseline by font's descent to avoid 'J'
etc. hanging below cell border.
This commit is contained in:
parent
fc2e87e0c4
commit
786a3fdc57
1 changed files with 2 additions and 1 deletions
|
@ -412,9 +412,10 @@ public class BoardView extends View implements DrawCtx,
|
|||
|
||||
private void drawCentered( String text, Rect rect )
|
||||
{
|
||||
int descent = m_fillPaint.getFontMetricsInt().descent;
|
||||
int bottom = rect.bottom;
|
||||
int center = rect.left + ( (rect.right - rect.left) / 2 );
|
||||
m_canvas.drawText( text, center, bottom, m_fillPaint );
|
||||
m_canvas.drawText( text, center, bottom - descent, m_fillPaint );
|
||||
}
|
||||
|
||||
private void positionDrawTile( Rect rect, String text,
|
||||
|
|
Loading…
Add table
Reference in a new issue