what-the-bank/sources/o/fLG.java

60 lines
1.9 KiB
Java
Raw Permalink Normal View History

2024-07-27 18:17:47 +07:00
package o;
import android.graphics.Bitmap;
import android.graphics.BitmapShader;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.RectF;
import android.graphics.Shader;
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
/* loaded from: classes5.dex */
public final class fLG implements InterfaceC13024fOe {
private final int a;
private final int b;
private int c;
private final int d;
public fLG(int i, int i2, int i3) {
this.a = i;
this.b = 0;
this.c = i2;
this.d = i3;
}
public fLG(int i) {
this.c = 0;
this.a = i;
this.b = 0;
this.d = 0;
}
@Override // o.InterfaceC13024fOe
public final Bitmap aBE_(Bitmap bitmap) {
Paint paint = new Paint();
paint.setAntiAlias(true);
Shader.TileMode tileMode = Shader.TileMode.CLAMP;
paint.setShader(new BitmapShader(bitmap, tileMode, tileMode));
Bitmap createBitmap = Bitmap.createBitmap(bitmap.getWidth(), bitmap.getHeight(), Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(createBitmap);
RectF rectF = new RectF(BitmapDescriptorFactory.HUE_RED, BitmapDescriptorFactory.HUE_RED, bitmap.getWidth() - this.b, bitmap.getHeight() - this.b);
float f = this.a;
canvas.drawRoundRect(rectF, f, f, paint);
Paint paint2 = new Paint();
paint2.setColor(this.c);
paint2.setStyle(Paint.Style.STROKE);
paint2.setAntiAlias(true);
paint2.setStrokeWidth(this.d);
canvas.drawCircle((bitmap.getWidth() - this.b) / 2.0f, (bitmap.getHeight() - this.b) / 2.0f, this.a - (this.d / 2.0f), paint2);
if (bitmap != createBitmap) {
bitmap.recycle();
}
return createBitmap;
}
@Override // o.InterfaceC13024fOe
public final String d() {
return "rounded";
}
}