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

49 lines
1.6 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 fLI implements InterfaceC13024fOe {
private float b;
public fLI() {
this((byte) 0);
}
private fLI(byte b) {
this.b = BitmapDescriptorFactory.HUE_RED;
}
@Override // o.InterfaceC13024fOe
public final Bitmap aBE_(Bitmap bitmap) {
int min = Math.min(bitmap.getWidth(), bitmap.getHeight());
Bitmap createBitmap = Bitmap.createBitmap(bitmap, (bitmap.getWidth() - min) / 2, (bitmap.getHeight() - min) / 2, min, min);
if (createBitmap != bitmap) {
bitmap.recycle();
}
Bitmap createBitmap2 = Bitmap.createBitmap(min, min, createBitmap.getConfig());
Canvas canvas = new Canvas(createBitmap2);
Paint paint = new Paint();
Shader.TileMode tileMode = Shader.TileMode.CLAMP;
paint.setShader(new BitmapShader(createBitmap, tileMode, tileMode));
paint.setAntiAlias(true);
float f = min / 2.0f;
canvas.drawRoundRect(new RectF(BitmapDescriptorFactory.HUE_RED, BitmapDescriptorFactory.HUE_RED, createBitmap.getWidth() - this.b, createBitmap.getHeight() - this.b), f, f, paint);
if (createBitmap2 != createBitmap) {
createBitmap.recycle();
}
return createBitmap2;
}
@Override // o.InterfaceC13024fOe
public final String d() {
return "circle";
}
}