what-the-bank/sources/com/github/mikephil/charting/charts/PieRadarChartBase.java

214 lines
5.9 KiB
Java
Raw Normal View History

2024-07-27 18:17:47 +07:00
package com.github.mikephil.charting.charts;
import android.content.Context;
import android.graphics.RectF;
import android.util.AttributeSet;
import android.view.MotionEvent;
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
import o.AbstractC0810PWv;
import o.InterfaceC17394wQe;
import o.JfG;
import o.Lhm;
import o.QFQ;
import o.UFB;
import o.yoL;
/* loaded from: classes.dex */
public abstract class PieRadarChartBase<T extends JfG<? extends InterfaceC17394wQe<? extends Lhm>>> extends Chart<T> {
public float E;
public boolean F;
public float H;
private float t;
public abstract int c(float f);
/* JADX INFO: Access modifiers changed from: protected */
@Override // com.github.mikephil.charting.charts.Chart
public void e() {
}
public abstract float p();
protected abstract float q();
protected abstract float r();
public PieRadarChartBase(Context context) {
super(context);
this.H = 270.0f;
this.E = 270.0f;
this.F = true;
this.t = BitmapDescriptorFactory.HUE_RED;
}
public PieRadarChartBase(Context context, AttributeSet attributeSet) {
super(context, attributeSet);
this.H = 270.0f;
this.E = 270.0f;
this.F = true;
this.t = BitmapDescriptorFactory.HUE_RED;
}
public PieRadarChartBase(Context context, AttributeSet attributeSet, int i) {
super(context, attributeSet, i);
this.H = 270.0f;
this.E = 270.0f;
this.F = true;
this.t = BitmapDescriptorFactory.HUE_RED;
}
/* JADX INFO: Access modifiers changed from: protected */
@Override // com.github.mikephil.charting.charts.Chart
public void m() {
super.m();
this.e = new yoL(this);
}
@Override // android.view.View
public boolean onTouchEvent(MotionEvent motionEvent) {
if (this.l && this.e != null) {
return this.e.onTouch(this, motionEvent);
}
return super.onTouchEvent(motionEvent);
}
@Override // android.view.View
public void computeScroll() {
if (this.e instanceof yoL) {
((yoL) this.e).e();
}
}
@Override // com.github.mikephil.charting.charts.Chart
public void o() {
if (this.c == null) {
return;
}
e();
if (this.k != null) {
this.m.a(this.c);
}
b();
}
/* JADX WARN: Code restructure failed: missing block: B:14:0x0068, code lost:
if (r3 != 2) goto L52;
*/
@Override // com.github.mikephil.charting.charts.Chart
/*
Code decompiled incorrectly, please refer to instructions dump.
To view partially-correct add '--show-bad-code' argument
*/
public void b() {
/*
Method dump skipped, instructions count: 496
To view this dump add '--comments-level debug' option
*/
throw new UnsupportedOperationException("Method not decompiled: com.github.mikephil.charting.charts.PieRadarChartBase.b():void");
}
/* JADX INFO: Access modifiers changed from: package-private */
/* renamed from: com.github.mikephil.charting.charts.PieRadarChartBase$2, reason: invalid class name */
/* loaded from: classes.dex */
public static /* synthetic */ class AnonymousClass2 {
static final int[] a;
static final int[] b;
static final int[] d;
static {
int[] iArr = new int[UFB.IeS.values().length];
b = iArr;
try {
iArr[UFB.IeS.VERTICAL.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
b[UFB.IeS.HORIZONTAL.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
int[] iArr2 = new int[UFB.Sts.values().length];
a = iArr2;
try {
iArr2[UFB.Sts.LEFT.ordinal()] = 1;
} catch (NoSuchFieldError unused3) {
}
try {
a[UFB.Sts.RIGHT.ordinal()] = 2;
} catch (NoSuchFieldError unused4) {
}
try {
a[UFB.Sts.CENTER.ordinal()] = 3;
} catch (NoSuchFieldError unused5) {
}
int[] iArr3 = new int[UFB.LWm.values().length];
d = iArr3;
try {
iArr3[UFB.LWm.TOP.ordinal()] = 1;
} catch (NoSuchFieldError unused6) {
}
try {
d[UFB.LWm.BOTTOM.ordinal()] = 2;
} catch (NoSuchFieldError unused7) {
}
}
}
public final float e(float f, float f2) {
QFQ c = c();
double d = f - c.a;
double d2 = f2 - c.e;
float degrees = (float) Math.toDegrees(Math.acos(d2 / Math.sqrt((d * d) + (d2 * d2))));
if (f > c.a) {
degrees = 360.0f - degrees;
}
float f3 = degrees + 90.0f;
if (f3 > 360.0f) {
f3 -= 360.0f;
}
QFQ.b(c);
return f3;
}
public final float a(float f, float f2) {
float f3;
float f4;
QFQ c = c();
if (f > c.a) {
f3 = f - c.a;
} else {
f3 = c.a - f;
}
if (f2 > c.e) {
f4 = f2 - c.e;
} else {
f4 = c.e - f2;
}
float sqrt = (float) Math.sqrt(Math.pow(f3, 2.0d) + Math.pow(f4, 2.0d));
QFQ.b(c);
return sqrt;
}
public void setRotationAngle(float f) {
this.E = f;
this.H = AbstractC0810PWv.c(f);
}
public final float t() {
RectF rectF = this.r.b;
rectF.left += h();
rectF.top += f();
rectF.right -= i();
rectF.bottom -= j();
return Math.min(rectF.width(), rectF.height());
}
public void setRotationEnabled(boolean z) {
this.F = z;
}
public void setMinOffset(float f) {
this.t = f;
}
}