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
GskCanvas: implement RoundedRect filling
This commit is contained in:
@@ -91,7 +91,7 @@ public class GskCanvas extends Canvas {
|
||||
|
||||
@Override
|
||||
public void drawRoundRect(float left, float top, float right, float bottom, float rx, float ry, Paint paint) {
|
||||
native_drawRoundRect(snapshot, left, top, right, bottom, rx, ry, paint.getColor(), paint.getStrokeWidth());
|
||||
native_drawRoundRect(snapshot, left, top, right, bottom, rx, ry, paint.getColor(), paint.getStrokeWidth(), paint.getStyle().nativeInt);
|
||||
}
|
||||
|
||||
protected native void native_drawBitmap(long snapshot, long texture, int x, int y, int width, int height, int color);
|
||||
@@ -103,5 +103,5 @@ public class GskCanvas extends Canvas {
|
||||
protected native void native_restore(long snapshot);
|
||||
protected native void native_drawLine(long snapshot, float startX, float startY, float stopX, float stopY, long paint);
|
||||
protected native void native_drawText(long snapshot, String text, float x, float y, long paint, long font);
|
||||
protected native void native_drawRoundRect(long snapshot, float left, float top, float right, float bottom, float rx, float ry, int color, float strokeWidth);
|
||||
protected native void native_drawRoundRect(long snapshot, float left, float top, float right, float bottom, float rx, float ry, int color, float strokeWidth, int style);
|
||||
}
|
||||
|
||||
@@ -307,6 +307,10 @@ public class Paint {
|
||||
|
||||
public float getLetterSpacing() { return 1.0f; }
|
||||
|
||||
public Style getStyle() {
|
||||
return Style.values()[native_get_style(skia_paint)];
|
||||
}
|
||||
|
||||
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);
|
||||
@@ -320,4 +324,5 @@ public class Paint {
|
||||
private static native float native_get_stroke_width(long skia_font);
|
||||
private static native void native_set_style(long skia_paint, int style);
|
||||
private static native void native_set_blendmode(long skia_paint, int mode);
|
||||
private static native int native_get_style(long skia_paint);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user