summaryrefslogtreecommitdiffstats
path: root/graphics
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 /graphics
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 'graphics')
-rw-r--r--graphics/java/android/graphics/Canvas.java76
1 files changed, 1 insertions, 75 deletions
diff --git a/graphics/java/android/graphics/Canvas.java b/graphics/java/android/graphics/Canvas.java
index 5b50f8f..35ed4d2 100644
--- a/graphics/java/android/graphics/Canvas.java
+++ b/graphics/java/android/graphics/Canvas.java
@@ -1414,77 +1414,13 @@ public class Canvas {
} else {
char[] buf = TemporaryBuffer.obtain(end - start);
TextUtils.getChars(text, start, end, buf, 0);
- native_drawText(mNativeCanvas, buf, 0, end - start, x, y,
+ native_drawText(mNativeCanvas, buf, 0, end - start, x, y,
paint.mBidiFlags, paint.mNativePaint);
TemporaryBuffer.recycle(buf);
}
}
/**
- * Draw the text, with origin at (x,y), using the specified paint. The
- * origin is interpreted based on the Align setting in the paint.
- *
- * @param text The text to be drawn
- * @param x The x-coordinate of the origin of the text being drawn
- * @param y The y-coordinate of the origin of the text being drawn
- * @param paint The paint used for the text (e.g. color, size, style)
- *
- * @hide
- *
- * Used only for BiDi / RTL Tests
- */
- public void drawTextWithGlyphs(char[] text, int index, int count, float x, float y,
- Paint paint) {
- if ((index | count | (index + count) |
- (text.length - index - count)) < 0) {
- throw new IndexOutOfBoundsException();
- }
- native_drawTextWithGlyphs(mNativeCanvas, text, index, count, x, y, paint.mBidiFlags,
- paint.mNativePaint);
- }
-
- /**
- * Draw the text, with origin at (x,y), using the specified paint. The
- * origin is interpreted based on the Align setting in the paint.
- *
- * @param text The text to be drawn
- * @param x The x-coordinate of the origin of the text being drawn
- * @param y The y-coordinate of the origin of the text being drawn
- * @param paint The paint used for the text (e.g. color, size, style)
- *
- * @hide
- *
- * Used only for BiDi / RTL Tests
- */
- public void drawTextWithGlyphs(String text, float x, float y, Paint paint) {
- native_drawTextWithGlyphs(mNativeCanvas, text, 0, text.length(), x, y, paint.mBidiFlags,
- paint.mNativePaint);
- }
-
- /**
- * Draw the glyphs, with origin at (x,y), using the specified paint. The
- * origin is interpreted based on the Align setting in the paint.
- *
- * @param glyphs The glyphs to be drawn
- * @param x The x-coordinate of the origin of the text being drawn
- * @param y The y-coordinate of the origin of the text being drawn
- * @param paint The paint used for the text (e.g. color, size, style)
- *
- * @hide
- *
- * Used only for BiDi / RTL Tests
- */
- public void drawGlyphs(char[] glyphs, int index, int count, float x, float y,
- Paint paint) {
- if ((index | count | (index + count) |
- (glyphs.length - index - count)) < 0) {
- throw new IndexOutOfBoundsException();
- }
- native_drawGlyphs(mNativeCanvas, glyphs, index, count, x, y, paint.mBidiFlags,
- paint.mNativePaint);
- }
-
- /**
* Render a run of all LTR or all RTL text, with shaping. This does not run
* bidi on the provided text, but renders it as a uniform right-to-left or
* left-to-right run, as indicated by dir. Alignment of the text is as
@@ -1813,16 +1749,6 @@ public class Canvas {
int start, int end, float x,
float y, int flags, int paint);
- private static native void native_drawTextWithGlyphs(int nativeCanvas, char[] text,
- int index, int count, float x,
- float y, int flags, int paint);
- private static native void native_drawTextWithGlyphs(int nativeCanvas, String text,
- int start, int end, float x,
- float y, int flags, int paint);
- private static native void native_drawGlyphs(int nativeCanvas, char[] glyphs,
- int index, int count, float x,
- float y, int flags, int paint);
-
private static native void native_drawTextRun(int nativeCanvas, String text,
int start, int end, int contextStart, int contextEnd,
float x, float y, int flags, int paint);