API stubs and fixes for composeUI

This commit is contained in:
Julian Winkler
2024-11-27 14:59:37 +01:00
committed by Mis012
parent 447784b6d6
commit e9cf5e7002
35 changed files with 559 additions and 24 deletions

View File

@@ -470,6 +470,27 @@ public class Canvas {
return false;
}
public boolean clipRect(float left, float top, float right, float bottom) {
return false;
}
public boolean isHardwareAccelerated() {
return false;
}
public boolean clipRect(float left, float top, float right, float bottom, Region.Op op) {
return false;
}
public void drawArc(float left, float top, float right, float bottom, float startAngle, float sweepAngle, boolean includeCenter, Paint paint) {}
public void drawRoundRect(float left, float top, float right, float bottom, float rx, float ry, Paint paint) {}
public boolean getClipBounds(Rect outRect) {
outRect.set(0, 0, 100, 100);
return false;
}
private static native long native_canvas_from_bitmap(long pixbuf);
private static native void native_save(long skia_canvas, long widget);

View File

@@ -0,0 +1,10 @@
package android.graphics;
public class Outline {
public void setAlpha(float alpha) {}
public void setEmpty() {}
public void setRoundRect(int left, int top, int right, int bottom, float r) {}
}

View File

@@ -284,6 +284,12 @@ public class Paint {
public void set(Paint paint) {}
public boolean isFilterBitmap() { return false; }
public Cap getStrokeCap() { return Cap.BUTT; }
public Join getStrokeJoin() { return Join.MITER; }
private native long native_constructor();
private native void native_set_antialias(long skia_paint, boolean aa);
private native void native_set_color(long skia_paint, int color);

View File

@@ -59,4 +59,8 @@ public class Typeface {
public int getStyle() {
return 0;
}
public static Typeface defaultFromStyle(int style) {
return create((String)null, style);
}
}

View File

@@ -299,6 +299,8 @@ public class Drawable {
return false;
}
public void setHotspot(float x, float y) {}
protected static native long native_paintable_from_path(String path);
protected native long native_constructor();
protected native void native_invalidate(long paintable);

View File

@@ -8,4 +8,6 @@ public class RippleDrawable extends LayerDrawable {
super(drawable == null ? new Drawable[] {} : new Drawable[] {drawable});
}
public void setColor(ColorStateList colorStateList) {}
}