mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-29 08:34:37 +01:00
fix drawing blank tiles
This commit is contained in:
parent
da0b54273f
commit
e76306a543
1 changed files with 11 additions and 11 deletions
|
@ -304,10 +304,8 @@ public class BoardView extends View implements DrawCtx,
|
|||
m_fillPaint.setColor( TILE_BACK );
|
||||
m_canvas.drawRect( rect, m_fillPaint );
|
||||
|
||||
if ( null != text ) {
|
||||
m_fillPaint.setColor( m_playerColors[m_trayOwner] );
|
||||
positionDrawTile( rect, text, val );
|
||||
}
|
||||
m_fillPaint.setColor( m_playerColors[m_trayOwner] );
|
||||
positionDrawTile( rect, text, val );
|
||||
|
||||
m_canvas.drawRect( rect, m_strokePaint ); // frame
|
||||
}
|
||||
|
@ -351,14 +349,16 @@ public class BoardView extends View implements DrawCtx,
|
|||
|
||||
private void positionDrawTile( Rect rect, String text, int val )
|
||||
{
|
||||
if ( null == m_letterRect ) {
|
||||
// assumes show values is on
|
||||
m_letterRect = new Rect( 0, 0, rect.width() * 3 / 4,
|
||||
rect.height() * 3 / 4 );
|
||||
if ( null != text ) {
|
||||
if ( null == m_letterRect ) {
|
||||
// assumes show values is on
|
||||
m_letterRect = new Rect( 0, 0, rect.width() * 3 / 4,
|
||||
rect.height() * 3 / 4 );
|
||||
}
|
||||
m_letterRect.offsetTo( rect.left, rect.top );
|
||||
m_fillPaint.setTextSize( m_letterRect.height() );
|
||||
drawCentered( text, m_letterRect );
|
||||
}
|
||||
m_letterRect.offsetTo( rect.left, rect.top );
|
||||
m_fillPaint.setTextSize( m_letterRect.height() );
|
||||
drawCentered( text, m_letterRect );
|
||||
|
||||
if ( null == m_valRect ) {
|
||||
m_valRect = new Rect( 0, 0, rect.width() / 4, rect.height() / 4 );
|
||||
|
|
Loading…
Add table
Reference in a new issue