155 lines
5.4 KiB
Java
155 lines
5.4 KiB
Java
package o;
|
|
|
|
import android.content.res.ColorStateList;
|
|
import android.graphics.Canvas;
|
|
import android.graphics.ColorFilter;
|
|
import android.graphics.Paint;
|
|
import android.graphics.Path;
|
|
import android.graphics.Rect;
|
|
import android.graphics.RectF;
|
|
import android.graphics.drawable.Drawable;
|
|
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
|
|
|
|
/* loaded from: classes.dex */
|
|
final class pvK extends Drawable {
|
|
private static final double d = Math.cos(Math.toRadians(45.0d));
|
|
private final RectF a;
|
|
private float b;
|
|
private boolean c;
|
|
private ColorStateList e;
|
|
private final int f;
|
|
private Paint g;
|
|
private boolean h;
|
|
private Paint i;
|
|
private Path j;
|
|
private float k;
|
|
private float l;
|
|
private float m;
|
|
|
|
/* renamed from: o, reason: collision with root package name */
|
|
private Paint f9243o;
|
|
|
|
@Override // android.graphics.drawable.Drawable
|
|
public final int getOpacity() {
|
|
return -3;
|
|
}
|
|
|
|
@Override // android.graphics.drawable.Drawable
|
|
public final void setAlpha(int i) {
|
|
throw null;
|
|
}
|
|
|
|
@Override // android.graphics.drawable.Drawable
|
|
protected final void onBoundsChange(Rect rect) {
|
|
super.onBoundsChange(rect);
|
|
this.h = true;
|
|
}
|
|
|
|
@Override // android.graphics.drawable.Drawable
|
|
public final boolean getPadding(Rect rect) {
|
|
int ceil = (int) Math.ceil(0.0d);
|
|
int ceil2 = (int) Math.ceil(0.0d);
|
|
rect.set(ceil2, ceil, ceil2, ceil);
|
|
return true;
|
|
}
|
|
|
|
@Override // android.graphics.drawable.Drawable
|
|
protected final boolean onStateChange(int[] iArr) {
|
|
throw null;
|
|
}
|
|
|
|
@Override // android.graphics.drawable.Drawable
|
|
public final boolean isStateful() {
|
|
return super.isStateful();
|
|
}
|
|
|
|
@Override // android.graphics.drawable.Drawable
|
|
public final void setColorFilter(ColorFilter colorFilter) {
|
|
throw null;
|
|
}
|
|
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
/* JADX WARN: Type inference failed for: r11v1 */
|
|
/* JADX WARN: Type inference failed for: r11v2, types: [java.lang.Throwable, android.graphics.Paint] */
|
|
/* JADX WARN: Type inference failed for: r11v3 */
|
|
@Override // android.graphics.drawable.Drawable
|
|
public final void draw(Canvas canvas) {
|
|
?? r11;
|
|
int i;
|
|
if (this.h) {
|
|
Rect bounds = getBounds();
|
|
this.a.set(bounds.left + this.l, bounds.top + BitmapDescriptorFactory.HUE_RED, bounds.right - this.l, bounds.bottom);
|
|
RectF rectF = new RectF(-0.0f, -0.0f, BitmapDescriptorFactory.HUE_RED, BitmapDescriptorFactory.HUE_RED);
|
|
RectF rectF2 = new RectF(rectF);
|
|
rectF2.inset(-0.0f, -0.0f);
|
|
Path path = this.j;
|
|
if (path == null) {
|
|
this.j = new Path();
|
|
} else {
|
|
path.reset();
|
|
}
|
|
this.j.setFillType(Path.FillType.EVEN_ODD);
|
|
this.j.moveTo(-0.0f, BitmapDescriptorFactory.HUE_RED);
|
|
this.j.rLineTo(-0.0f, BitmapDescriptorFactory.HUE_RED);
|
|
this.j.arcTo(rectF2, 180.0f, 90.0f, false);
|
|
this.j.arcTo(rectF, 270.0f, -90.0f, false);
|
|
this.j.close();
|
|
throw new ArithmeticException();
|
|
}
|
|
canvas.translate(BitmapDescriptorFactory.HUE_RED, BitmapDescriptorFactory.HUE_RED);
|
|
float f = this.f + BitmapDescriptorFactory.HUE_RED + (this.m / 2.0f);
|
|
float f2 = f * 2.0f;
|
|
boolean z = this.a.width() - f2 > BitmapDescriptorFactory.HUE_RED;
|
|
boolean z2 = this.a.height() - f2 > BitmapDescriptorFactory.HUE_RED;
|
|
int save = canvas.save();
|
|
canvas.translate(this.a.left + f, this.a.top + f);
|
|
canvas.drawPath(this.j, null);
|
|
if (z) {
|
|
r11 = 0;
|
|
i = save;
|
|
canvas.drawRect(BitmapDescriptorFactory.HUE_RED, -0.0f, this.a.width() - f2, -0.0f, null);
|
|
} else {
|
|
r11 = 0;
|
|
i = save;
|
|
}
|
|
canvas.restoreToCount(i);
|
|
int save2 = canvas.save();
|
|
canvas.translate(this.a.right - f, this.a.bottom - f);
|
|
canvas.rotate(180.0f);
|
|
canvas.drawPath(this.j, r11);
|
|
if (z) {
|
|
canvas.drawRect(BitmapDescriptorFactory.HUE_RED, -0.0f, this.a.width() - f2, BitmapDescriptorFactory.HUE_RED, null);
|
|
}
|
|
canvas.restoreToCount(save2);
|
|
int save3 = canvas.save();
|
|
canvas.translate(this.a.left + f, this.a.bottom - f);
|
|
canvas.rotate(270.0f);
|
|
canvas.drawPath(this.j, r11);
|
|
if (z2) {
|
|
canvas.drawRect(BitmapDescriptorFactory.HUE_RED, -0.0f, this.a.height() - f2, -0.0f, null);
|
|
}
|
|
canvas.restoreToCount(save3);
|
|
int save4 = canvas.save();
|
|
canvas.translate(this.a.right - f, this.a.top + f);
|
|
canvas.rotate(90.0f);
|
|
canvas.drawPath(this.j, r11);
|
|
if (z2) {
|
|
canvas.drawRect(BitmapDescriptorFactory.HUE_RED, -0.0f, this.a.height() - f2, -0.0f, null);
|
|
}
|
|
canvas.restoreToCount(save4);
|
|
canvas.translate(BitmapDescriptorFactory.HUE_RED, -0.0f);
|
|
throw r11;
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
public static float b(float f, float f2, boolean z) {
|
|
float f3 = f * 1.5f;
|
|
return z ? (float) (f3 + ((1.0d - d) * f2)) : f3;
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
public static float e(float f, float f2, boolean z) {
|
|
return z ? (float) (f + ((1.0d - d) * f2)) : f;
|
|
}
|
|
}
|