You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07:00
make android.text.Layout.draw() compatible custom Canvas classes
TextAndroidCanvas is a proxy canvas class which prevents us from accessing the GtkSnapshot of the real canvas. To solve this problem, we call Canvas.drawText() for each line.
This commit is contained in:
@@ -143,6 +143,14 @@ JNIEXPORT jint JNICALL Java_android_text_Layout_native_1get_1ellipsis_1count
|
||||
JNIEXPORT void JNICALL Java_android_text_Layout_native_1draw
|
||||
(JNIEnv *, jobject, jlong, jlong, jlong);
|
||||
|
||||
/*
|
||||
* Class: android_text_Layout
|
||||
* Method: native_draw_custom_canvas
|
||||
* Signature: (JLandroid/graphics/Canvas;Landroid/graphics/Paint;)V
|
||||
*/
|
||||
JNIEXPORT void JNICALL Java_android_text_Layout_native_1draw_1custom_1canvas
|
||||
(JNIEnv *, jobject, jlong, jobject, jobject);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user