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
reimplement Bitmap and Path using GdkTexture and GskPath
This allows us to use GskCanvas for Bitmap rendering This increases the required GTK version to >= 4.14.
This commit is contained in:
@@ -20,8 +20,6 @@ public class ImageButton extends ImageView {
|
||||
@Override
|
||||
protected native long native_constructor(Context context, AttributeSet attrs);
|
||||
@Override
|
||||
protected native void native_setPixbuf(long widget, long pixbuf);
|
||||
@Override
|
||||
protected native void native_setDrawable(long widget, long paintable);
|
||||
@Override
|
||||
protected native void nativeSetOnClickListener(long widget);
|
||||
|
||||
@@ -51,7 +51,7 @@ public class ImageView extends View {
|
||||
return;
|
||||
}
|
||||
bitmap = BitmapFactory.decodeResource(Context.this_application.getResources(), resid);
|
||||
native_setPixbuf(widget, bitmap.pixbuf);
|
||||
native_setDrawable(widget, bitmap.getTexture());
|
||||
}
|
||||
public void setAdjustViewBounds(boolean adjustViewBounds) {}
|
||||
|
||||
@@ -84,7 +84,7 @@ public class ImageView extends View {
|
||||
|
||||
public void setImageBitmap(Bitmap bitmap) {
|
||||
if (bitmap != null)
|
||||
native_setPixbuf(widget, bitmap.pixbuf);
|
||||
native_setDrawable(widget, bitmap.getTexture());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -184,7 +184,6 @@ public class ImageView extends View {
|
||||
|
||||
@Override
|
||||
protected native long native_constructor(Context context, AttributeSet attrs);
|
||||
protected native void native_setPixbuf(long widget, long pixbuf);
|
||||
protected native void native_setDrawable(long widget, long paintable);
|
||||
protected native void native_setScaleType(long widget, int scale_type);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user