diff options
author | Romain Guy <romainguy@google.com> | 2011-08-02 17:32:41 -0700 |
---|---|---|
committer | Romain Guy <romainguy@google.com> | 2011-08-02 17:32:41 -0700 |
commit | bd496bc3d481f9cfc39007d22372d3a1a8809f96 (patch) | |
tree | 1c69e8c136dd81e68459c8b9870e0fac4bd6ae10 /tests/HwAccelerationTest | |
parent | 6805545649f2b194859033df94602492b9ec086e (diff) | |
download | frameworks_base-bd496bc3d481f9cfc39007d22372d3a1a8809f96.zip frameworks_base-bd496bc3d481f9cfc39007d22372d3a1a8809f96.tar.gz frameworks_base-bd496bc3d481f9cfc39007d22372d3a1a8809f96.tar.bz2 |
Paint style and stroke width affect text rendering.
Bug #5112207
Change-Id: Ic34037ace21a5058ba23dd15e51aae58c998454d
Diffstat (limited to 'tests/HwAccelerationTest')
-rw-r--r-- | tests/HwAccelerationTest/src/com/android/test/hwui/TextActivity.java | 10 |
1 files changed, 10 insertions, 0 deletions
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(); |