diff options
author | Fabrice Di Meglio <fdimeglio@google.com> | 2011-07-15 17:49:22 -0700 |
---|---|---|
committer | Fabrice Di Meglio <fdimeglio@google.com> | 2011-07-15 17:49:22 -0700 |
commit | 796cc96243a57cd1b652bd90c4e7ba7823c6c2fe (patch) | |
tree | ddcb9feeb3761abd5311b4baecc7e2dbc5385acf /tests/BiDiTests/src | |
parent | c1df573aedd20e9ac862765d068cc4e8fcdda953 (diff) | |
download | frameworks_base-796cc96243a57cd1b652bd90c4e7ba7823c6c2fe.zip frameworks_base-796cc96243a57cd1b652bd90c4e7ba7823c6c2fe.tar.gz frameworks_base-796cc96243a57cd1b652bd90c4e7ba7823c6c2fe.tar.bz2 |
Clean test APIs for Harfbuzz support
- also update unit tests
Change-Id: I557f61e84c4c4b6165163b783d9c679a6b3b4106
Diffstat (limited to 'tests/BiDiTests/src')
-rw-r--r-- | tests/BiDiTests/src/com/android/bidi/BiDiTestView.java | 32 |
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(); |