summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRomain Guy <romainguy@google.com>2012-01-18 18:01:34 -0800
committerAndroid (Google) Code Review <android-gerrit@google.com>2012-01-18 18:01:34 -0800
commit4785a6ff8d48f51813611f2cab998b235ce2bbca (patch)
tree746b2e1deb9af261392e32966bb05c16d03fd37d /tests
parent170bfe32ab8971805d56f8870758cbc46060d1ef (diff)
parent671d6cf460531825a321edb200523d0faa7792c9 (diff)
downloadframeworks_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.java13
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();
}
}