From 11bd4a73fe590407601939af46839e7d1f433cc3 Mon Sep 17 00:00:00 2001 From: Eric House Date: Wed, 11 Jul 2012 06:17:36 -0700 Subject: [PATCH] oops: fix centered text drawing. --- .../XWords4/src/org/eehouse/android/xw4/BoardView.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/BoardView.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/BoardView.java index 5f4937aa5..b9ae4e46a 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/BoardView.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/BoardView.java @@ -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 );