mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-06 05:24:46 +01:00
oops: fix centered text drawing.
This commit is contained in:
parent
bad6c599f8
commit
11bd4a73fe
1 changed files with 2 additions and 2 deletions
|
@ -965,11 +965,11 @@ public class BoardView extends View implements DrawCtx, BoardHandler,
|
|||
drawScaled( text, rect, m_boundsScratch, descent );
|
||||
} else {
|
||||
int bottom = rect.bottom - descent;
|
||||
int origin = rect.left + (extra / 5);
|
||||
int origin = rect.left;
|
||||
if ( Paint.Align.CENTER == align ) {
|
||||
origin += rect.width() / 2;
|
||||
} else {
|
||||
origin -= m_boundsScratch.left;
|
||||
origin += (extra / 5) - m_boundsScratch.left;
|
||||
}
|
||||
m_fillPaint.setTextAlign( align );
|
||||
m_canvas.drawText( text, origin, bottom, m_fillPaint );
|
||||
|
|
Loading…
Reference in a new issue