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
Canvas: implement another overload of drawRoundRect()
This commit is contained in:
@@ -416,13 +416,20 @@ public class Canvas {
|
||||
gsk_canvas.restoreToCount(count);
|
||||
}
|
||||
|
||||
public void drawRoundRect(RectF rect, float rx, float ry, Paint paint) {
|
||||
public void drawRoundRect(float left, float top, float right, float bottom, float rx, float ry, Paint paint) {
|
||||
if (paint.getShader() instanceof BitmapShader) {
|
||||
BitmapShader shader = (BitmapShader)paint.getShader();
|
||||
drawBitmap(shader.bitmap, 0, 0, paint);
|
||||
} else {
|
||||
gsk_canvas.snapshot = bitmap.getSnapshot();
|
||||
gsk_canvas.drawRoundRect(left, top, right, bottom, rx, ry, paint);
|
||||
}
|
||||
}
|
||||
|
||||
public void drawRoundRect(RectF rect, float rx, float ry, Paint paint) {
|
||||
drawRoundRect(rect.left, rect.top, rect.right, rect.bottom, rx, ry, paint);
|
||||
}
|
||||
|
||||
public void getMatrix(Matrix matrix) {
|
||||
matrix.reset();
|
||||
}
|
||||
@@ -518,10 +525,6 @@ public class Canvas {
|
||||
Log.w("Canvas", "STUB: drawArc");
|
||||
}
|
||||
|
||||
public void drawRoundRect(float left, float top, float right, float bottom, float rx, float ry, Paint paint) {
|
||||
Log.w("Canvas", "STUB: drawRoundRect");
|
||||
}
|
||||
|
||||
public boolean getClipBounds(Rect outRect) {
|
||||
/* UGLY HACK */
|
||||
outRect.set(0, 0, Resources.getSystem().getDisplayMetrics().widthPixels, Resources.getSystem().getDisplayMetrics().heightPixels);
|
||||
|
||||
Reference in New Issue
Block a user