api-impl: add stubs / simple stuff for OsmAnd

without native libs present, launches and renders white square
in map view; with native libs present, segfaults in bundled skia
This commit is contained in:
Mis012
2024-04-12 18:32:30 +02:00
parent fefd2f108b
commit 2802aaa28d
42 changed files with 2171 additions and 77 deletions

View File

@@ -257,6 +257,9 @@ public class Canvas {
if (dst == null) {
throw new NullPointerException();
}
if(src == null) {
src = new Rect(0, 0, bitmap.getWidth(), bitmap.getHeight());
}
native_drawBitmap(skia_canvas, widget, bitmap.pixbuf, src.left, src.top, src.right, src.bottom,
dst.left, dst.top, dst.right, dst.bottom,
(paint != null) ? paint.skia_paint : 0);
@@ -416,6 +419,16 @@ public class Canvas {
return false;
}
public int getWidth() {
return 10; //FIXME
}
public int getHeight() {
return 10; //FIXME
}
public void drawColor(int dummy) {}
private static native long native_canvas_from_bitmap(long pixbuf);
private static native void native_save(long skia_canvas, long widget);