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
api-impl: misc stubs and trivial impls
This commit is contained in:
@@ -32,6 +32,9 @@ public final class Bitmap {
|
||||
public enum CompressFormat {
|
||||
JPEG,
|
||||
PNG,
|
||||
WEBP,
|
||||
WEBP_LOSSY,
|
||||
WEBP_LOSSLESS,
|
||||
}
|
||||
|
||||
private int width;
|
||||
|
||||
@@ -207,7 +207,6 @@ public class Canvas {
|
||||
* @param py The y-coord for the pivot point (unchanged by the scale)
|
||||
*/
|
||||
public final void scale(float sx, float sy, float px, float py) {
|
||||
System.out.println("XXXXXXX scale(sx, sy, px, py)");
|
||||
translate(px, py);
|
||||
scale(sx, sy);
|
||||
translate(-px, -py);
|
||||
@@ -466,6 +465,10 @@ public class Canvas {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean clipRect(RectF rect) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean clipRect(float left, float top, float right, float bottom, Region.Op op) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ public class Paint {
|
||||
public long paint; // native paint
|
||||
private Xfermode xfermode;
|
||||
private Shader shader;
|
||||
private Align align = Align.CENTER;
|
||||
|
||||
public Paint() {
|
||||
paint = native_create();
|
||||
@@ -322,6 +323,10 @@ public class Paint {
|
||||
return Style.values[native_get_style(paint)];
|
||||
}
|
||||
|
||||
public Align getTextAlign() {
|
||||
return align;
|
||||
}
|
||||
|
||||
private static native long native_create();
|
||||
private static native long native_clone(long paint);
|
||||
private static native void native_recycle(long paint);
|
||||
|
||||
@@ -112,6 +112,10 @@ public class Path {
|
||||
native_rel_quad_to(getBuilder(), x1, y1, x2, y2);
|
||||
}
|
||||
|
||||
public void addArc (RectF oval, float startAngle, float sweepAngle) {}
|
||||
|
||||
public void addArc (float left, float top, float right, float bottom, float startAngle, float sweepAngle) {}
|
||||
|
||||
public void addPath(Path path, Matrix matrix) {
|
||||
native_add_path(getBuilder(), path.getGskPath(), matrix.ni());
|
||||
}
|
||||
@@ -153,6 +157,13 @@ public class Path {
|
||||
path = 0;
|
||||
}
|
||||
|
||||
public void transform(Matrix matrix, Path out_path) {
|
||||
if(out_path == null)
|
||||
out_path = this;
|
||||
|
||||
out_path.transform(matrix);
|
||||
}
|
||||
|
||||
public void computeBounds(RectF bounds, boolean exact) {
|
||||
native_get_bounds(getGskPath(), bounds);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user