diff options
author | Romain Guy <romainguy@google.com> | 2012-01-18 18:01:34 -0800 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-01-18 18:01:34 -0800 |
commit | 4785a6ff8d48f51813611f2cab998b235ce2bbca (patch) | |
tree | 746b2e1deb9af261392e32966bb05c16d03fd37d /tests | |
parent | 170bfe32ab8971805d56f8870758cbc46060d1ef (diff) | |
parent | 671d6cf460531825a321edb200523d0faa7792c9 (diff) | |
download | frameworks_base-4785a6ff8d48f51813611f2cab998b235ce2bbca.zip frameworks_base-4785a6ff8d48f51813611f2cab998b235ce2bbca.tar.gz frameworks_base-4785a6ff8d48f51813611f2cab998b235ce2bbca.tar.bz2 |
Merge "Full support for Canvas.drawPosText"
Diffstat (limited to 'tests')
-rw-r--r-- | tests/HwAccelerationTest/src/com/android/test/hwui/PosTextActivity.java | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/HwAccelerationTest/src/com/android/test/hwui/PosTextActivity.java b/tests/HwAccelerationTest/src/com/android/test/hwui/PosTextActivity.java index f0ff737..1c868d2 100644 --- a/tests/HwAccelerationTest/src/com/android/test/hwui/PosTextActivity.java +++ b/tests/HwAccelerationTest/src/com/android/test/hwui/PosTextActivity.java @@ -58,8 +58,21 @@ public class PosTextActivity extends Activity { canvas.drawRGB(255, 255, 255); canvas.save(); + + canvas.drawLine(100.0f, 0.0f, 100.0f, getHeight(), mLargePaint); + canvas.translate(100.0f, 100.0f); + mLargePaint.setTextAlign(Paint.Align.LEFT); + canvas.drawPosText(mText, mPos, mLargePaint); + + canvas.translate(0.0f, 50.0f); + mLargePaint.setTextAlign(Paint.Align.CENTER); canvas.drawPosText(mText, mPos, mLargePaint); + + canvas.translate(0.0f, 50.0f); + mLargePaint.setTextAlign(Paint.Align.RIGHT); + canvas.drawPosText(mText, mPos, mLargePaint); + canvas.restore(); } } |