From bd496bc3d481f9cfc39007d22372d3a1a8809f96 Mon Sep 17 00:00:00 2001 From: Romain Guy Date: Tue, 2 Aug 2011 17:32:41 -0700 Subject: Paint style and stroke width affect text rendering. Bug #5112207 Change-Id: Ic34037ace21a5058ba23dd15e51aae58c998454d --- .../src/com/android/test/hwui/TextActivity.java | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tests/HwAccelerationTest') diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/TextActivity.java b/tests/HwAccelerationTest/src/com/android/test/hwui/TextActivity.java index 7bf25cf..4037a69 100644 --- a/tests/HwAccelerationTest/src/com/android/test/hwui/TextActivity.java +++ b/tests/HwAccelerationTest/src/com/android/test/hwui/TextActivity.java @@ -77,13 +77,23 @@ public class TextActivity extends Activity { super.onDraw(canvas); canvas.drawRGB(255, 255, 255); + mMediumPaint.setStyle(Paint.Style.FILL_AND_STROKE); + mMediumPaint.setStrokeWidth(2.0f); canvas.drawText("Hello OpenGL renderer!", 100, 20, mMediumPaint); + + mMediumPaint.setStyle(Paint.Style.FILL); mMediumPaint.setTextAlign(Paint.Align.CENTER); canvas.drawText("Hello OpenGL renderer!", 100, 40, mMediumPaint); + + mMediumPaint.setStyle(Paint.Style.STROKE); + mMediumPaint.setStrokeWidth(2.0f); mMediumPaint.setTextAlign(Paint.Align.RIGHT); canvas.drawText("Hello OpenGL renderer!", 100, 60, mMediumPaint); + + mMediumPaint.setStyle(Paint.Style.FILL); mMediumPaint.setTextAlign(Paint.Align.LEFT); canvas.drawText("Hello OpenGL renderer!", 100, 100, mMediumPaint); + mMediumPaint.setShadowLayer(2.5f, 0.0f, 0.0f, 0xff000000); canvas.drawText("Hello OpenGL renderer!", 100, 150, mMediumPaint); mMediumPaint.clearShadowLayer(); -- cgit v1.1