diff options
author | Dudy Kohen <kohen.d@gmail.com> | 2010-06-18 10:48:17 -0400 |
---|---|---|
committer | Steve Kondik <shade@chemlab.org> | 2010-06-30 21:35:22 -0400 |
commit | 1b0aca31c3e03a5a323276cd15a8df4203a1792c (patch) | |
tree | 36afd8be86105e713a889d50f8beb5d6cf1e14de /core/java/android/text | |
parent | 97f215132cd1085f7e05e165cce1c79590d85beb (diff) | |
download | frameworks_base-1b0aca31c3e03a5a323276cd15a8df4203a1792c.zip frameworks_base-1b0aca31c3e03a5a323276cd15a8df4203a1792c.tar.gz frameworks_base-1b0aca31c3e03a5a323276cd15a8df4203a1792c.tar.bz2 |
Improved BiDi text rendering.
Diffstat (limited to 'core/java/android/text')
-rw-r--r-- | core/java/android/text/Layout.java | 3 | ||||
-rw-r--r-- | core/java/android/text/SpannableStringBuilder.java | 6 | ||||
-rw-r--r-- | core/java/android/text/Styled.java | 8 |
3 files changed, 8 insertions, 9 deletions
diff --git a/core/java/android/text/Layout.java b/core/java/android/text/Layout.java index 38ac9b7..af20eed 100644 --- a/core/java/android/text/Layout.java +++ b/core/java/android/text/Layout.java @@ -364,8 +364,7 @@ public abstract class Layout { Assert.assertTrue(dir == DIR_LEFT_TO_RIGHT); Assert.assertNotNull(c); } - // XXX: assumes there's nothing additional to be done - c.drawText(buf, start, end, x, lbaseline, paint); + c.drawText(buf, start, end, x, lbaseline, paint,false); } else { drawText(c, buf, start, end, dir, directions, x, ltop, lbaseline, lbottom, paint, mWorkPaint, diff --git a/core/java/android/text/SpannableStringBuilder.java b/core/java/android/text/SpannableStringBuilder.java index caaafa1..7f7de24 100644 --- a/core/java/android/text/SpannableStringBuilder.java +++ b/core/java/android/text/SpannableStringBuilder.java @@ -1042,14 +1042,14 @@ implements CharSequence, GetChars, Spannable, Editable, Appendable, checkRange("drawText", start, end); if (end <= mGapStart) { - c.drawText(mText, start, end - start, x, y, p); + c.drawText(mText, start, end - start, x, y, p,false); } else if (start >= mGapStart) { - c.drawText(mText, start + mGapLength, end - start, x, y, p); + c.drawText(mText, start + mGapLength, end - start, x, y, p,false); } else { char[] buf = TextUtils.obtain(end - start); getChars(start, end, buf, 0); - c.drawText(buf, 0, end - start, x, y, p); + c.drawText(buf, 0, end - start, x, y, p,false); TextUtils.recycle(buf); } } diff --git a/core/java/android/text/Styled.java b/core/java/android/text/Styled.java index 513b2cd..d2be383 100644 --- a/core/java/android/text/Styled.java +++ b/core/java/android/text/Styled.java @@ -129,7 +129,7 @@ public class Styled } canvas.drawText(tmp, tmpstart, tmpend, - x - ret, y + workPaint.baselineShift, workPaint); + x - ret, y + workPaint.baselineShift, workPaint,false); } else { if (needWidth) { if (!haveWidth) { @@ -139,7 +139,7 @@ public class Styled } canvas.drawText(tmp, tmpstart, tmpend, - x, y + workPaint.baselineShift, workPaint); + x, y + workPaint.baselineShift, workPaint,false); } } else { if (needWidth && !haveWidth) { @@ -261,13 +261,13 @@ public class Styled if (canvas != null) canvas.drawText(tmp, 0, tmpend, - x - ret, y, paint); + x - ret, y, paint,false); } else { if (needWidth) ret = paint.measureText(text, start, end); if (canvas != null) - canvas.drawText(text, start, end, x, y, paint); + canvas.drawText(text, start, end, x, y, paint,false); } if (fmi != null) { |