summaryrefslogtreecommitdiffstats
path: root/tests/BiDiTests
diff options
context:
space:
mode:
authorFabrice Di Meglio <fdimeglio@google.com>2011-07-18 14:26:34 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-07-18 14:26:34 -0700
commit46c72507984f32c8b5c86721086b624d73ae859a (patch)
treea3ee17bff81be54548fccb5e60e9e5f69f2c61f9 /tests/BiDiTests
parent054d5c5740fd422c369e65b56d876fb111313f52 (diff)
parent796cc96243a57cd1b652bd90c4e7ba7823c6c2fe (diff)
downloadframeworks_base-46c72507984f32c8b5c86721086b624d73ae859a.zip
frameworks_base-46c72507984f32c8b5c86721086b624d73ae859a.tar.gz
frameworks_base-46c72507984f32c8b5c86721086b624d73ae859a.tar.bz2
Merge "Clean test APIs for Harfbuzz support"
Diffstat (limited to 'tests/BiDiTests')
-rw-r--r--tests/BiDiTests/src/com/android/bidi/BiDiTestView.java32
1 files changed, 4 insertions, 28 deletions
diff --git a/tests/BiDiTests/src/com/android/bidi/BiDiTestView.java b/tests/BiDiTests/src/com/android/bidi/BiDiTestView.java
index 4f17e52..27e1887 100644
--- a/tests/BiDiTests/src/com/android/bidi/BiDiTestView.java
+++ b/tests/BiDiTests/src/com/android/bidi/BiDiTestView.java
@@ -168,15 +168,11 @@ public class BiDiTestView extends View {
drawMetricsAroundText(canvas, x, y, textWidthHB, textWidthICU, textSize, Color.RED, Color.GREEN);
paint.setColor(Color.WHITE);
-// char[] glyphs = new char[2*length];
-// int count = getGlyphs(text, glyphs, dir);
-//
-// logGlypths(glyphs, count);
-// drawTextWithDrawGlyph(canvas, glyphs, count, x, y + currentTextSize);
- Log.v(TAG, "START -- drawTextWithGlyphs");
- drawTextWithGlyphs(canvas, text, x, y + currentTextSize, dir);
- Log.v(TAG, "END -- drawTextWithGlyphs");
+ Log.v(TAG, "START -- drawText");
+ setPaintDir(paint, dir);
+ canvas.drawText(text, x, y + currentTextSize, this.paint);
+ Log.v(TAG, "END -- drawText");
// Restore old paint properties
paint.setFakeBoldText(oldFakeBold);
@@ -190,26 +186,6 @@ public class BiDiTestView extends View {
paint.setBidiFlags(dir);
}
- private void drawTextWithDrawGlyph(Canvas canvas, char[] glyphs, int count, int x, int y) {
- canvas.drawGlyphs(glyphs, 0, count, x, y, paint);
- }
-
- private void drawTextWithGlyphs(Canvas canvas, String text, int x, int y, int dir) {
- setPaintDir(paint, dir);
- canvas.drawTextWithGlyphs(text, x, y, paint);
- }
-
- private void logGlypths(char[] glyphs, int count) {
- Log.v(TAG, "GlyphIds - count=" + count);
- for (int n = 0; n < count; n++) {
- Log.v(TAG, "GlyphIds - Id[" + n + "]="+ (int)glyphs[n]);
- }
- }
-
- private int getGlyphs(String text, char[] glyphs, int dir) {
- return paint.getTextGlypths(text, 0, text.length(), 0, text.length(), dir, glyphs);
- }
-
private void drawInsideRect(Canvas canvas, int color) {
paint.setColor(color);
int width = getWidth();