when drawing letter in tray tile, only shift origin left of edge when

letter width exceeds that of tile.
This commit is contained in:
Eric House 2012-07-09 07:03:39 -07:00
parent 5702c83f17
commit e6f02ee3c7

View file

@ -968,7 +968,10 @@ public class BoardView extends View implements DrawCtx, BoardHandler,
if ( Paint.Align.CENTER == align ) {
origin += rect.width() / 2;
} else {
origin -= m_boundsScratch.left - 1;
int right = m_boundsScratch.left + m_boundsScratch.width();
if ( right > rect.right ) {
origin -= m_boundsScratch.left;
}
}
m_fillPaint.setTextAlign( align );
m_canvas.drawText( text, origin, bottom, m_fillPaint );