884 lines
35 KiB
Java
884 lines
35 KiB
Java
|
package o;
|
||
|
|
||
|
import android.graphics.Bitmap;
|
||
|
import android.graphics.Canvas;
|
||
|
import android.graphics.Color;
|
||
|
import android.graphics.Paint;
|
||
|
import android.graphics.Path;
|
||
|
import android.graphics.RectF;
|
||
|
import android.graphics.drawable.Drawable;
|
||
|
import android.text.Layout;
|
||
|
import android.text.StaticLayout;
|
||
|
import android.text.TextPaint;
|
||
|
import com.github.mikephil.charting.charts.PieChart;
|
||
|
import com.google.android.gms.maps.model.BitmapDescriptorFactory;
|
||
|
import java.lang.ref.WeakReference;
|
||
|
import java.util.Iterator;
|
||
|
import java.util.List;
|
||
|
import o.C16180lwo;
|
||
|
|
||
|
/* loaded from: classes.dex */
|
||
|
public final class xzO extends stp {
|
||
|
public Canvas c;
|
||
|
public WeakReference<Bitmap> f;
|
||
|
public Paint g;
|
||
|
public Paint h;
|
||
|
public Paint i;
|
||
|
public TextPaint j;
|
||
|
private PieChart l;
|
||
|
private StaticLayout m;
|
||
|
private CharSequence n;
|
||
|
|
||
|
/* renamed from: o, reason: collision with root package name */
|
||
|
private RectF f9318o;
|
||
|
private Path p;
|
||
|
private RectF q;
|
||
|
private Path r;
|
||
|
private RectF s;
|
||
|
private Path t;
|
||
|
private RectF[] w;
|
||
|
private Paint x;
|
||
|
|
||
|
public xzO(PieChart pieChart, C3144arv c3144arv, DRH drh) {
|
||
|
super(c3144arv, drh);
|
||
|
this.f9318o = new RectF();
|
||
|
this.w = new RectF[]{new RectF(), new RectF(), new RectF()};
|
||
|
this.p = new Path();
|
||
|
this.s = new RectF();
|
||
|
this.t = new Path();
|
||
|
this.r = new Path();
|
||
|
this.q = new RectF();
|
||
|
this.l = pieChart;
|
||
|
Paint paint = new Paint(1);
|
||
|
this.h = paint;
|
||
|
paint.setColor(-1);
|
||
|
this.h.setStyle(Paint.Style.FILL);
|
||
|
Paint paint2 = new Paint(1);
|
||
|
this.g = paint2;
|
||
|
paint2.setColor(-1);
|
||
|
this.g.setStyle(Paint.Style.FILL);
|
||
|
this.g.setAlpha(105);
|
||
|
TextPaint textPaint = new TextPaint(1);
|
||
|
this.j = textPaint;
|
||
|
textPaint.setColor(-16777216);
|
||
|
this.j.setTextSize(AbstractC0810PWv.d(12.0f));
|
||
|
this.a.setTextSize(AbstractC0810PWv.d(13.0f));
|
||
|
this.a.setColor(-1);
|
||
|
this.a.setTextAlign(Paint.Align.CENTER);
|
||
|
Paint paint3 = new Paint(1);
|
||
|
this.i = paint3;
|
||
|
paint3.setColor(-1);
|
||
|
this.i.setTextAlign(Paint.Align.CENTER);
|
||
|
this.i.setTextSize(AbstractC0810PWv.d(13.0f));
|
||
|
Paint paint4 = new Paint(1);
|
||
|
this.x = paint4;
|
||
|
paint4.setStyle(Paint.Style.STROKE);
|
||
|
}
|
||
|
|
||
|
/* JADX WARN: Multi-variable type inference failed */
|
||
|
@Override // o.stp
|
||
|
public final void GR_(Canvas canvas) {
|
||
|
Iterator<InterfaceC1234Ypa> it;
|
||
|
InterfaceC1234Ypa interfaceC1234Ypa;
|
||
|
float f;
|
||
|
float f2;
|
||
|
float f3;
|
||
|
RectF rectF;
|
||
|
int i;
|
||
|
float[] fArr;
|
||
|
RectF rectF2;
|
||
|
float f4;
|
||
|
int i2;
|
||
|
int i3;
|
||
|
float f5;
|
||
|
RectF rectF3;
|
||
|
float f6;
|
||
|
int i4;
|
||
|
int i5 = (int) this.k.e;
|
||
|
int i6 = (int) this.k.a;
|
||
|
WeakReference<Bitmap> weakReference = this.f;
|
||
|
Bitmap bitmap = weakReference == null ? null : weakReference.get();
|
||
|
if (bitmap == null || bitmap.getWidth() != i5 || bitmap.getHeight() != i6) {
|
||
|
if (i5 <= 0 || i6 <= 0) {
|
||
|
return;
|
||
|
}
|
||
|
bitmap = Bitmap.createBitmap(i5, i6, Bitmap.Config.ARGB_4444);
|
||
|
this.f = new WeakReference<>(bitmap);
|
||
|
this.c = new Canvas(bitmap);
|
||
|
}
|
||
|
int i7 = 0;
|
||
|
bitmap.eraseColor(0);
|
||
|
Iterator<InterfaceC1234Ypa> it2 = ((Dfa) this.l.g()).d().iterator();
|
||
|
while (it2.hasNext()) {
|
||
|
InterfaceC1234Ypa next = it2.next();
|
||
|
if (next.o() && next.r() > 0) {
|
||
|
float f7 = this.l.H;
|
||
|
float f8 = this.d.d;
|
||
|
float f9 = this.d.a;
|
||
|
RectF rectF4 = this.l.u;
|
||
|
int r = next.r();
|
||
|
float[] fArr2 = this.l.w;
|
||
|
PieChart pieChart = this.l;
|
||
|
QFQ e = QFQ.e(pieChart.u.centerX(), pieChart.u.centerY());
|
||
|
float p = this.l.p();
|
||
|
int i8 = (!this.l.D || this.l.A) ? i7 : 1;
|
||
|
float f10 = i8 != 0 ? (this.l.B / 100.0f) * p : 0.0f;
|
||
|
float f11 = (p - ((this.l.B * p) / 100.0f)) / 2.0f;
|
||
|
RectF rectF5 = new RectF();
|
||
|
int i9 = (i8 == 0 || !this.l.C) ? i7 : 1;
|
||
|
for (int i10 = i7; i10 < r; i10++) {
|
||
|
if (Math.abs(next.d(i10).e) > AbstractC0810PWv.e) {
|
||
|
i7++;
|
||
|
}
|
||
|
}
|
||
|
float d = i7 <= 1 ? 0.0f : d(next);
|
||
|
float f12 = 0.0f;
|
||
|
int i11 = 0;
|
||
|
while (i11 < r) {
|
||
|
float f13 = fArr2[i11];
|
||
|
if (Math.abs(next.d(i11).e) > AbstractC0810PWv.e && !(this.l.a(i11) && i9 == 0)) {
|
||
|
it = it2;
|
||
|
boolean z = d > BitmapDescriptorFactory.HUE_RED && f13 <= 180.0f;
|
||
|
i = r;
|
||
|
this.e.setColor(next.a(i11));
|
||
|
float f14 = i7 == 1 ? 0.0f : d / (p * 0.017453292f);
|
||
|
float f15 = f7 + ((f12 + (f14 / 2.0f)) * f9);
|
||
|
float f16 = (f13 - f14) * f9;
|
||
|
float f17 = f16 < BitmapDescriptorFactory.HUE_RED ? 0.0f : f16;
|
||
|
this.p.reset();
|
||
|
if (i9 != 0) {
|
||
|
float f18 = p - f11;
|
||
|
interfaceC1234Ypa = next;
|
||
|
f = f7;
|
||
|
double d2 = f15 * 0.017453292f;
|
||
|
f2 = f8;
|
||
|
f3 = f9;
|
||
|
float cos = e.a + (((float) Math.cos(d2)) * f18);
|
||
|
float sin = e.e + (f18 * ((float) Math.sin(d2)));
|
||
|
rectF5.set(cos - f11, sin - f11, cos + f11, sin + f11);
|
||
|
} else {
|
||
|
interfaceC1234Ypa = next;
|
||
|
f = f7;
|
||
|
f2 = f8;
|
||
|
f3 = f9;
|
||
|
}
|
||
|
double d3 = f15 * 0.017453292f;
|
||
|
float cos2 = e.a + (((float) Math.cos(d3)) * p);
|
||
|
float sin2 = e.e + (((float) Math.sin(d3)) * p);
|
||
|
float f19 = f17;
|
||
|
if (f19 >= 360.0f && f19 % 360.0f <= AbstractC0810PWv.e) {
|
||
|
fArr = fArr2;
|
||
|
i3 = i11;
|
||
|
this.p.addCircle(e.a, e.e, p, Path.Direction.CW);
|
||
|
} else {
|
||
|
fArr = fArr2;
|
||
|
i3 = i11;
|
||
|
if (i9 != 0) {
|
||
|
this.p.arcTo(rectF5, f15 + 180.0f, -180.0f);
|
||
|
}
|
||
|
this.p.arcTo(rectF4, f15, f19);
|
||
|
}
|
||
|
rectF = rectF4;
|
||
|
this.s.set(e.a - f10, e.e - f10, e.a + f10, e.e + f10);
|
||
|
if (i8 == 0) {
|
||
|
rectF2 = rectF5;
|
||
|
f4 = f10;
|
||
|
i2 = i3;
|
||
|
f5 = 360.0f;
|
||
|
} else if (f10 > BitmapDescriptorFactory.HUE_RED || z) {
|
||
|
if (z) {
|
||
|
rectF3 = rectF5;
|
||
|
f6 = f10;
|
||
|
i2 = i3;
|
||
|
i4 = 1;
|
||
|
float c = c(e, p, f13 * f3, cos2, sin2, f15, f19);
|
||
|
if (c < BitmapDescriptorFactory.HUE_RED) {
|
||
|
c = -c;
|
||
|
}
|
||
|
f10 = Math.max(f6, c);
|
||
|
} else {
|
||
|
rectF3 = rectF5;
|
||
|
f6 = f10;
|
||
|
i2 = i3;
|
||
|
i4 = 1;
|
||
|
}
|
||
|
float f20 = (i7 == i4 || f10 == BitmapDescriptorFactory.HUE_RED) ? 0.0f : d / (f10 * 0.017453292f);
|
||
|
float f21 = f20 / 2.0f;
|
||
|
float f22 = (f13 - f20) * f3;
|
||
|
if (f22 < BitmapDescriptorFactory.HUE_RED) {
|
||
|
f22 = 0.0f;
|
||
|
}
|
||
|
float f23 = f + ((f12 + f21) * f3) + f22;
|
||
|
if (f19 >= 360.0f && f19 % 360.0f <= AbstractC0810PWv.e) {
|
||
|
this.p.addCircle(e.a, e.e, f10, Path.Direction.CCW);
|
||
|
rectF2 = rectF3;
|
||
|
f4 = f6;
|
||
|
} else {
|
||
|
if (i9 != 0) {
|
||
|
float f24 = p - f11;
|
||
|
double d4 = 0.017453292f * f23;
|
||
|
float cos3 = e.a + (((float) Math.cos(d4)) * f24);
|
||
|
float sin3 = e.e + (f24 * ((float) Math.sin(d4)));
|
||
|
rectF3.set(cos3 - f11, sin3 - f11, cos3 + f11, sin3 + f11);
|
||
|
this.p.arcTo(rectF3, f23, 180.0f);
|
||
|
rectF2 = rectF3;
|
||
|
f4 = f6;
|
||
|
} else {
|
||
|
double d5 = 0.017453292f * f23;
|
||
|
rectF2 = rectF3;
|
||
|
f4 = f6;
|
||
|
this.p.lineTo(e.a + (((float) Math.cos(d5)) * f10), e.e + (f10 * ((float) Math.sin(d5))));
|
||
|
}
|
||
|
this.p.arcTo(this.s, f23, -f22);
|
||
|
}
|
||
|
this.p.close();
|
||
|
this.c.drawPath(this.p, this.e);
|
||
|
f12 += f13 * f2;
|
||
|
} else {
|
||
|
rectF2 = rectF5;
|
||
|
f4 = f10;
|
||
|
i2 = i3;
|
||
|
f5 = 360.0f;
|
||
|
}
|
||
|
if (f19 % f5 > AbstractC0810PWv.e) {
|
||
|
if (z) {
|
||
|
float c2 = c(e, p, f13 * f3, cos2, sin2, f15, f19);
|
||
|
double d6 = (f15 + (f19 / 2.0f)) * 0.017453292f;
|
||
|
this.p.lineTo(e.a + (((float) Math.cos(d6)) * c2), e.e + (c2 * ((float) Math.sin(d6))));
|
||
|
} else {
|
||
|
this.p.lineTo(e.a, e.e);
|
||
|
}
|
||
|
}
|
||
|
this.p.close();
|
||
|
this.c.drawPath(this.p, this.e);
|
||
|
f12 += f13 * f2;
|
||
|
} else {
|
||
|
f12 += f13 * f8;
|
||
|
it = it2;
|
||
|
interfaceC1234Ypa = next;
|
||
|
f = f7;
|
||
|
f2 = f8;
|
||
|
f3 = f9;
|
||
|
rectF = rectF4;
|
||
|
i = r;
|
||
|
fArr = fArr2;
|
||
|
rectF2 = rectF5;
|
||
|
f4 = f10;
|
||
|
i2 = i11;
|
||
|
}
|
||
|
i11 = i2 + 1;
|
||
|
it2 = it;
|
||
|
rectF5 = rectF2;
|
||
|
r = i;
|
||
|
next = interfaceC1234Ypa;
|
||
|
f7 = f;
|
||
|
f8 = f2;
|
||
|
f9 = f3;
|
||
|
fArr2 = fArr;
|
||
|
rectF4 = rectF;
|
||
|
f10 = f4;
|
||
|
}
|
||
|
QFQ.b(e);
|
||
|
i7 = 0;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
private static float c(QFQ qfq, float f, float f2, float f3, float f4, float f5, float f6) {
|
||
|
double d = (f5 + f6) * 0.017453292f;
|
||
|
float cos = qfq.a + (((float) Math.cos(d)) * f);
|
||
|
float sin = qfq.e + (((float) Math.sin(d)) * f);
|
||
|
double d2 = (f5 + (f6 / 2.0f)) * 0.017453292f;
|
||
|
return (float) ((f - ((float) ((Math.sqrt(Math.pow(cos - f3, 2.0d) + Math.pow(sin - f4, 2.0d)) / 2.0d) * Math.tan(((180.0d - f2) / 2.0d) * 0.017453292519943295d)))) - Math.sqrt(Math.pow((qfq.a + (((float) Math.cos(d2)) * f)) - ((cos + f3) / 2.0f), 2.0d) + Math.pow((qfq.e + (((float) Math.sin(d2)) * f)) - ((sin + f4) / 2.0f), 2.0d)));
|
||
|
}
|
||
|
|
||
|
/* JADX WARN: Multi-variable type inference failed */
|
||
|
private float d(InterfaceC1234Ypa interfaceC1234Ypa) {
|
||
|
if (!interfaceC1234Ypa.E()) {
|
||
|
return interfaceC1234Ypa.u();
|
||
|
}
|
||
|
float u = interfaceC1234Ypa.u();
|
||
|
DRH drh = this.k;
|
||
|
return u / Math.min(drh.b.width(), drh.b.height()) > (interfaceC1234Ypa.y() / ((Dfa) this.l.g()).h()) * 2.0f ? BitmapDescriptorFactory.HUE_RED : interfaceC1234Ypa.u();
|
||
|
}
|
||
|
|
||
|
/* JADX WARN: Multi-variable type inference failed */
|
||
|
@Override // o.stp
|
||
|
public final void GU_(Canvas canvas) {
|
||
|
int i;
|
||
|
List<InterfaceC1234Ypa> list;
|
||
|
float f;
|
||
|
Canvas canvas2;
|
||
|
boolean z;
|
||
|
float[] fArr;
|
||
|
float[] fArr2;
|
||
|
float f2;
|
||
|
float f3;
|
||
|
float f4;
|
||
|
int i2;
|
||
|
QFQ qfq;
|
||
|
float f5;
|
||
|
C16180lwo.RVV rvv;
|
||
|
float f6;
|
||
|
QFQ qfq2;
|
||
|
boolean z2;
|
||
|
float f7;
|
||
|
float f8;
|
||
|
float f9;
|
||
|
Ikb ikb;
|
||
|
C16180lwo.RVV rvv2;
|
||
|
int i3;
|
||
|
vTS vts;
|
||
|
InterfaceC1234Ypa interfaceC1234Ypa;
|
||
|
Canvas canvas3;
|
||
|
String str;
|
||
|
C16180lwo.RVV rvv3;
|
||
|
Ikb ikb2;
|
||
|
Canvas canvas4 = canvas;
|
||
|
PieChart pieChart = this.l;
|
||
|
QFQ e = QFQ.e(pieChart.u.centerX(), pieChart.u.centerY());
|
||
|
float p = this.l.p();
|
||
|
float f10 = this.l.H;
|
||
|
float[] fArr3 = this.l.w;
|
||
|
float[] fArr4 = this.l.s;
|
||
|
float f11 = this.d.d;
|
||
|
float f12 = this.d.a;
|
||
|
float f13 = (p - ((this.l.B * p) / 100.0f)) / 2.0f;
|
||
|
float f14 = this.l.B / 100.0f;
|
||
|
float f15 = (p / 10.0f) * 3.6f;
|
||
|
if (this.l.D) {
|
||
|
f15 = (p - (p * f14)) / 2.0f;
|
||
|
if (!this.l.A && this.l.C) {
|
||
|
f10 = (float) (f10 + ((f13 * 360.0f) / (p * 6.283185307179586d)));
|
||
|
}
|
||
|
}
|
||
|
float f16 = f10;
|
||
|
float f17 = p - f15;
|
||
|
Dfa dfa = (Dfa) this.l.g();
|
||
|
List<InterfaceC1234Ypa> d = dfa.d();
|
||
|
float h = dfa.h();
|
||
|
boolean z3 = this.l.v;
|
||
|
canvas.save();
|
||
|
float d2 = AbstractC0810PWv.d(5.0f);
|
||
|
int i4 = 0;
|
||
|
int i5 = 0;
|
||
|
while (i5 < d.size()) {
|
||
|
InterfaceC1234Ypa interfaceC1234Ypa2 = d.get(i5);
|
||
|
boolean n = interfaceC1234Ypa2.n();
|
||
|
if (n || z3) {
|
||
|
C16180lwo.RVV F = interfaceC1234Ypa2.F();
|
||
|
C16180lwo.RVV I = interfaceC1234Ypa2.I();
|
||
|
e(interfaceC1234Ypa2);
|
||
|
i = i4;
|
||
|
int i6 = i5;
|
||
|
float Hc_ = AbstractC0810PWv.Hc_(this.a, "Q") + AbstractC0810PWv.d(4.0f);
|
||
|
vTS f18 = interfaceC1234Ypa2.f();
|
||
|
int r = interfaceC1234Ypa2.r();
|
||
|
list = d;
|
||
|
QFQ qfq3 = e;
|
||
|
this.x.setColor(interfaceC1234Ypa2.A());
|
||
|
this.x.setStrokeWidth(AbstractC0810PWv.d(interfaceC1234Ypa2.z()));
|
||
|
float d3 = d(interfaceC1234Ypa2);
|
||
|
QFQ d4 = QFQ.d(interfaceC1234Ypa2.j());
|
||
|
f = p;
|
||
|
d4.a = AbstractC0810PWv.d(d4.a);
|
||
|
d4.e = AbstractC0810PWv.d(d4.e);
|
||
|
int i7 = 0;
|
||
|
while (i7 < r) {
|
||
|
QFQ qfq4 = d4;
|
||
|
Ikb d5 = interfaceC1234Ypa2.d(i7);
|
||
|
int i8 = r;
|
||
|
float f19 = f16 + (((i == 0 ? BitmapDescriptorFactory.HUE_RED : fArr4[i - 1] * f11) + ((fArr3[i] - ((d3 / (f17 * 0.017453292f)) / 2.0f)) / 2.0f)) * f12);
|
||
|
float f20 = d3;
|
||
|
if (this.l.I) {
|
||
|
f5 = (d5.e / h) * 100.0f;
|
||
|
} else {
|
||
|
f5 = d5.e;
|
||
|
}
|
||
|
String d6 = f18.d(f5);
|
||
|
float[] fArr5 = fArr3;
|
||
|
String str2 = d5.b;
|
||
|
vTS vts2 = f18;
|
||
|
float[] fArr6 = fArr4;
|
||
|
float f21 = f11;
|
||
|
double d7 = f19 * 0.017453292f;
|
||
|
float f22 = f12;
|
||
|
float f23 = f16;
|
||
|
float cos = (float) Math.cos(d7);
|
||
|
int i9 = i7;
|
||
|
float sin = (float) Math.sin(d7);
|
||
|
boolean z4 = z3 && F == C16180lwo.RVV.OUTSIDE_SLICE;
|
||
|
boolean z5 = n && I == C16180lwo.RVV.OUTSIDE_SLICE;
|
||
|
boolean z6 = z3 && F == C16180lwo.RVV.INSIDE_SLICE;
|
||
|
boolean z7 = n && I == C16180lwo.RVV.INSIDE_SLICE;
|
||
|
if (z4 || z5) {
|
||
|
float B = interfaceC1234Ypa2.B();
|
||
|
float D = interfaceC1234Ypa2.D();
|
||
|
float C = interfaceC1234Ypa2.C() / 100.0f;
|
||
|
rvv = F;
|
||
|
if (this.l.D) {
|
||
|
float f24 = f * f14;
|
||
|
f6 = ((f - f24) * C) + f24;
|
||
|
} else {
|
||
|
f6 = f * C;
|
||
|
}
|
||
|
float abs = interfaceC1234Ypa2.H() ? D * f17 * Math.abs((float) Math.sin(d7)) : D * f17;
|
||
|
qfq2 = qfq3;
|
||
|
float f25 = qfq2.a;
|
||
|
float f26 = qfq2.e;
|
||
|
float f27 = (B + 1.0f) * f17;
|
||
|
z2 = z3;
|
||
|
float f28 = (f27 * cos) + qfq2.a;
|
||
|
float f29 = qfq2.e + (f27 * sin);
|
||
|
double d8 = f19 % 360.0d;
|
||
|
if (d8 >= 90.0d && d8 <= 270.0d) {
|
||
|
float f30 = f28 - abs;
|
||
|
this.a.setTextAlign(Paint.Align.RIGHT);
|
||
|
if (z4) {
|
||
|
this.i.setTextAlign(Paint.Align.RIGHT);
|
||
|
}
|
||
|
f8 = f30 - d2;
|
||
|
f7 = f30;
|
||
|
} else {
|
||
|
f7 = f28 + abs;
|
||
|
this.a.setTextAlign(Paint.Align.LEFT);
|
||
|
if (z4) {
|
||
|
this.i.setTextAlign(Paint.Align.LEFT);
|
||
|
}
|
||
|
f8 = f7 + d2;
|
||
|
}
|
||
|
float f31 = f8;
|
||
|
if (interfaceC1234Ypa2.A() != 1122867) {
|
||
|
if (interfaceC1234Ypa2.G()) {
|
||
|
this.x.setColor(interfaceC1234Ypa2.a(i9));
|
||
|
}
|
||
|
float f32 = f25 + (f6 * cos);
|
||
|
float f33 = (f6 * sin) + f26;
|
||
|
rvv2 = I;
|
||
|
interfaceC1234Ypa = interfaceC1234Ypa2;
|
||
|
int i10 = i6;
|
||
|
vts = vts2;
|
||
|
i3 = i10;
|
||
|
f9 = f31;
|
||
|
ikb = d5;
|
||
|
canvas.drawLine(f32, f33, f28, f29, this.x);
|
||
|
canvas.drawLine(f28, f29, f7, f29, this.x);
|
||
|
} else {
|
||
|
f9 = f31;
|
||
|
ikb = d5;
|
||
|
rvv2 = I;
|
||
|
i3 = i6;
|
||
|
vts = vts2;
|
||
|
interfaceC1234Ypa = interfaceC1234Ypa2;
|
||
|
}
|
||
|
if (z4 && z5) {
|
||
|
this.a.setColor(interfaceC1234Ypa.b(i9));
|
||
|
canvas3 = canvas;
|
||
|
str = d6;
|
||
|
rvv3 = rvv2;
|
||
|
canvas3.drawText(str, f9, f29, this.a);
|
||
|
if (i9 < dfa.c() && str2 != null) {
|
||
|
canvas3.drawText(str2, f9, f29 + Hc_, this.i);
|
||
|
}
|
||
|
} else {
|
||
|
canvas3 = canvas;
|
||
|
str = d6;
|
||
|
rvv3 = rvv2;
|
||
|
if (z4) {
|
||
|
if (i9 < dfa.c() && str2 != null) {
|
||
|
canvas3.drawText(str2, f9, f29 + (Hc_ / 2.0f), this.i);
|
||
|
}
|
||
|
} else if (z5) {
|
||
|
this.a.setColor(interfaceC1234Ypa.b(i9));
|
||
|
canvas3.drawText(str, f9, f29 + (Hc_ / 2.0f), this.a);
|
||
|
}
|
||
|
}
|
||
|
} else {
|
||
|
rvv = F;
|
||
|
z2 = z3;
|
||
|
ikb = d5;
|
||
|
i3 = i6;
|
||
|
qfq2 = qfq3;
|
||
|
vts = vts2;
|
||
|
str = d6;
|
||
|
canvas3 = canvas;
|
||
|
C16180lwo.RVV rvv4 = I;
|
||
|
interfaceC1234Ypa = interfaceC1234Ypa2;
|
||
|
rvv3 = rvv4;
|
||
|
}
|
||
|
if (z6 || z7) {
|
||
|
float f34 = (cos * f17) + qfq2.a;
|
||
|
float f35 = (sin * f17) + qfq2.e;
|
||
|
this.a.setTextAlign(Paint.Align.CENTER);
|
||
|
if (!z6 || !z7) {
|
||
|
if (z6) {
|
||
|
if (i9 < dfa.c() && str2 != null) {
|
||
|
canvas3.drawText(str2, f34, f35 + (Hc_ / 2.0f), this.i);
|
||
|
}
|
||
|
} else if (z7) {
|
||
|
this.a.setColor(interfaceC1234Ypa.b(i9));
|
||
|
canvas3.drawText(str, f34, f35 + (Hc_ / 2.0f), this.a);
|
||
|
}
|
||
|
ikb2 = ikb;
|
||
|
Drawable drawable = ikb2.c;
|
||
|
i++;
|
||
|
i7 = i9 + 1;
|
||
|
qfq3 = qfq2;
|
||
|
f18 = vts;
|
||
|
d3 = f20;
|
||
|
d4 = qfq4;
|
||
|
r = i8;
|
||
|
fArr4 = fArr6;
|
||
|
fArr3 = fArr5;
|
||
|
f11 = f21;
|
||
|
f12 = f22;
|
||
|
f16 = f23;
|
||
|
z3 = z2;
|
||
|
F = rvv;
|
||
|
i6 = i3;
|
||
|
InterfaceC1234Ypa interfaceC1234Ypa3 = interfaceC1234Ypa;
|
||
|
I = rvv3;
|
||
|
interfaceC1234Ypa2 = interfaceC1234Ypa3;
|
||
|
} else {
|
||
|
this.a.setColor(interfaceC1234Ypa.b(i9));
|
||
|
canvas3.drawText(str, f34, f35, this.a);
|
||
|
if (i9 < dfa.c() && str2 != null) {
|
||
|
canvas3.drawText(str2, f34, f35 + Hc_, this.i);
|
||
|
ikb2 = ikb;
|
||
|
Drawable drawable2 = ikb2.c;
|
||
|
i++;
|
||
|
i7 = i9 + 1;
|
||
|
qfq3 = qfq2;
|
||
|
f18 = vts;
|
||
|
d3 = f20;
|
||
|
d4 = qfq4;
|
||
|
r = i8;
|
||
|
fArr4 = fArr6;
|
||
|
fArr3 = fArr5;
|
||
|
f11 = f21;
|
||
|
f12 = f22;
|
||
|
f16 = f23;
|
||
|
z3 = z2;
|
||
|
F = rvv;
|
||
|
i6 = i3;
|
||
|
InterfaceC1234Ypa interfaceC1234Ypa32 = interfaceC1234Ypa;
|
||
|
I = rvv3;
|
||
|
interfaceC1234Ypa2 = interfaceC1234Ypa32;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
ikb2 = ikb;
|
||
|
Drawable drawable22 = ikb2.c;
|
||
|
i++;
|
||
|
i7 = i9 + 1;
|
||
|
qfq3 = qfq2;
|
||
|
f18 = vts;
|
||
|
d3 = f20;
|
||
|
d4 = qfq4;
|
||
|
r = i8;
|
||
|
fArr4 = fArr6;
|
||
|
fArr3 = fArr5;
|
||
|
f11 = f21;
|
||
|
f12 = f22;
|
||
|
f16 = f23;
|
||
|
z3 = z2;
|
||
|
F = rvv;
|
||
|
i6 = i3;
|
||
|
InterfaceC1234Ypa interfaceC1234Ypa322 = interfaceC1234Ypa;
|
||
|
I = rvv3;
|
||
|
interfaceC1234Ypa2 = interfaceC1234Ypa322;
|
||
|
}
|
||
|
canvas2 = canvas;
|
||
|
z = z3;
|
||
|
fArr = fArr3;
|
||
|
fArr2 = fArr4;
|
||
|
f2 = f11;
|
||
|
f3 = f12;
|
||
|
f4 = f16;
|
||
|
i2 = i6;
|
||
|
qfq = qfq3;
|
||
|
QFQ.b(d4);
|
||
|
} else {
|
||
|
i = i4;
|
||
|
i2 = i5;
|
||
|
z = z3;
|
||
|
list = d;
|
||
|
canvas2 = canvas4;
|
||
|
f = p;
|
||
|
fArr = fArr3;
|
||
|
fArr2 = fArr4;
|
||
|
f2 = f11;
|
||
|
f3 = f12;
|
||
|
f4 = f16;
|
||
|
qfq = e;
|
||
|
}
|
||
|
i5 = i2 + 1;
|
||
|
canvas4 = canvas2;
|
||
|
e = qfq;
|
||
|
i4 = i;
|
||
|
d = list;
|
||
|
p = f;
|
||
|
fArr4 = fArr2;
|
||
|
fArr3 = fArr;
|
||
|
f11 = f2;
|
||
|
f12 = f3;
|
||
|
f16 = f4;
|
||
|
z3 = z;
|
||
|
}
|
||
|
QFQ.b(e);
|
||
|
canvas.restore();
|
||
|
}
|
||
|
|
||
|
@Override // o.stp
|
||
|
public final void GS_(Canvas canvas) {
|
||
|
float p;
|
||
|
RectF rectF;
|
||
|
if (this.l.D && this.c != null) {
|
||
|
float p2 = this.l.p();
|
||
|
float f = (this.l.B / 100.0f) * p2;
|
||
|
PieChart pieChart = this.l;
|
||
|
QFQ e = QFQ.e(pieChart.u.centerX(), pieChart.u.centerY());
|
||
|
if (Color.alpha(this.h.getColor()) > 0) {
|
||
|
this.c.drawCircle(e.a, e.e, f, this.h);
|
||
|
}
|
||
|
if (Color.alpha(this.g.getColor()) > 0 && this.l.z > this.l.B) {
|
||
|
int alpha = this.g.getAlpha();
|
||
|
float f2 = this.l.z / 100.0f;
|
||
|
this.g.setAlpha((int) (alpha * this.d.d * this.d.a));
|
||
|
this.t.reset();
|
||
|
this.t.addCircle(e.a, e.e, p2 * f2, Path.Direction.CW);
|
||
|
this.t.addCircle(e.a, e.e, f, Path.Direction.CCW);
|
||
|
this.c.drawPath(this.t, this.g);
|
||
|
this.g.setAlpha(alpha);
|
||
|
}
|
||
|
QFQ.b(e);
|
||
|
}
|
||
|
canvas.drawBitmap(this.f.get(), BitmapDescriptorFactory.HUE_RED, BitmapDescriptorFactory.HUE_RED, (Paint) null);
|
||
|
CharSequence charSequence = this.l.t;
|
||
|
if (!this.l.y || charSequence == null) {
|
||
|
return;
|
||
|
}
|
||
|
PieChart pieChart2 = this.l;
|
||
|
QFQ e2 = QFQ.e(pieChart2.u.centerX(), pieChart2.u.centerY());
|
||
|
PieChart pieChart3 = this.l;
|
||
|
QFQ e3 = QFQ.e(pieChart3.p.a, pieChart3.p.e);
|
||
|
float f3 = e2.a + e3.a;
|
||
|
float f4 = e2.e + e3.e;
|
||
|
if (!this.l.D || this.l.A) {
|
||
|
p = this.l.p();
|
||
|
} else {
|
||
|
p = this.l.p() * (this.l.B / 100.0f);
|
||
|
}
|
||
|
RectF rectF2 = this.w[0];
|
||
|
rectF2.left = f3 - p;
|
||
|
rectF2.top = f4 - p;
|
||
|
rectF2.right = f3 + p;
|
||
|
rectF2.bottom = f4 + p;
|
||
|
RectF rectF3 = this.w[1];
|
||
|
rectF3.set(rectF2);
|
||
|
float f5 = this.l.x / 100.0f;
|
||
|
if (f5 > 0.0d) {
|
||
|
rectF3.inset((rectF3.width() - (rectF3.width() * f5)) / 2.0f, (rectF3.height() - (rectF3.height() * f5)) / 2.0f);
|
||
|
}
|
||
|
if (charSequence.equals(this.n) && rectF3.equals(this.f9318o)) {
|
||
|
rectF = rectF3;
|
||
|
} else {
|
||
|
this.f9318o.set(rectF3);
|
||
|
this.n = charSequence;
|
||
|
rectF = rectF3;
|
||
|
this.m = new StaticLayout(charSequence, 0, charSequence.length(), this.j, (int) Math.max(Math.ceil(this.f9318o.width()), 1.0d), Layout.Alignment.ALIGN_CENTER, 1.0f, BitmapDescriptorFactory.HUE_RED, false);
|
||
|
}
|
||
|
float height = this.m.getHeight();
|
||
|
canvas.save();
|
||
|
Path path = this.r;
|
||
|
path.reset();
|
||
|
path.addOval(rectF2, Path.Direction.CW);
|
||
|
canvas.clipPath(path);
|
||
|
canvas.translate(rectF.left, rectF.top + ((rectF.height() - height) / 2.0f));
|
||
|
this.m.draw(canvas);
|
||
|
canvas.restore();
|
||
|
QFQ.b(e2);
|
||
|
QFQ.b(e3);
|
||
|
}
|
||
|
|
||
|
/* JADX WARN: Multi-variable type inference failed */
|
||
|
@Override // o.stp
|
||
|
public final void GT_(Canvas canvas, UAQ[] uaqArr) {
|
||
|
boolean z;
|
||
|
float f;
|
||
|
float f2;
|
||
|
float[] fArr;
|
||
|
float[] fArr2;
|
||
|
int i;
|
||
|
RectF rectF;
|
||
|
float f3;
|
||
|
float f4;
|
||
|
InterfaceC1234Ypa b;
|
||
|
float f5;
|
||
|
int i2;
|
||
|
RectF rectF2;
|
||
|
float f6;
|
||
|
float f7;
|
||
|
float f8;
|
||
|
float f9;
|
||
|
UAQ[] uaqArr2 = uaqArr;
|
||
|
boolean z2 = this.l.D && !this.l.A;
|
||
|
if (z2 && this.l.C) {
|
||
|
return;
|
||
|
}
|
||
|
float f10 = this.d.d;
|
||
|
float f11 = this.d.a;
|
||
|
float f12 = this.l.H;
|
||
|
float[] fArr3 = this.l.w;
|
||
|
float[] fArr4 = this.l.s;
|
||
|
PieChart pieChart = this.l;
|
||
|
QFQ e = QFQ.e(pieChart.u.centerX(), pieChart.u.centerY());
|
||
|
float p = this.l.p();
|
||
|
float f13 = z2 ? (this.l.B / 100.0f) * p : 0.0f;
|
||
|
RectF rectF3 = this.q;
|
||
|
rectF3.set(BitmapDescriptorFactory.HUE_RED, BitmapDescriptorFactory.HUE_RED, BitmapDescriptorFactory.HUE_RED, BitmapDescriptorFactory.HUE_RED);
|
||
|
int i3 = 0;
|
||
|
while (i3 < uaqArr2.length) {
|
||
|
int i4 = (int) uaqArr2[i3].j;
|
||
|
if (i4 >= fArr3.length || (b = ((Dfa) this.l.g()).b(uaqArr2[i3].b)) == null || !b.l()) {
|
||
|
z = z2;
|
||
|
f = f10;
|
||
|
f2 = f12;
|
||
|
fArr = fArr3;
|
||
|
fArr2 = fArr4;
|
||
|
i = i3;
|
||
|
rectF = rectF3;
|
||
|
f3 = f11;
|
||
|
f4 = f13;
|
||
|
} else {
|
||
|
int r = b.r();
|
||
|
z = z2;
|
||
|
int i5 = 0;
|
||
|
int i6 = 0;
|
||
|
while (i5 < r) {
|
||
|
int i7 = i3;
|
||
|
if (Math.abs(b.d(i5).e) > AbstractC0810PWv.e) {
|
||
|
i6++;
|
||
|
}
|
||
|
i5++;
|
||
|
i3 = i7;
|
||
|
}
|
||
|
int i8 = i3;
|
||
|
float f14 = i4 == 0 ? BitmapDescriptorFactory.HUE_RED : fArr4[i4 - 1] * f10;
|
||
|
float u = i6 <= 1 ? BitmapDescriptorFactory.HUE_RED : b.u();
|
||
|
float f15 = fArr3[i4];
|
||
|
float v = b.v();
|
||
|
float f16 = p + v;
|
||
|
f = f10;
|
||
|
rectF3.set(this.l.u);
|
||
|
float f17 = -v;
|
||
|
rectF3.inset(f17, f17);
|
||
|
boolean z3 = u > BitmapDescriptorFactory.HUE_RED && f15 <= 180.0f;
|
||
|
this.e.setColor(b.a(i4));
|
||
|
float f18 = i6 == 1 ? BitmapDescriptorFactory.HUE_RED : u / (p * 0.017453292f);
|
||
|
float f19 = i6 == 1 ? BitmapDescriptorFactory.HUE_RED : u / (f16 * 0.017453292f);
|
||
|
float f20 = f12 + (((f18 / 2.0f) + f14) * f11);
|
||
|
float f21 = (f15 - f18) * f11;
|
||
|
float f22 = f21 < BitmapDescriptorFactory.HUE_RED ? 0.0f : f21;
|
||
|
float f23 = (((f19 / 2.0f) + f14) * f11) + f12;
|
||
|
float f24 = (f15 - f19) * f11;
|
||
|
if (f24 < BitmapDescriptorFactory.HUE_RED) {
|
||
|
f24 = 0.0f;
|
||
|
}
|
||
|
this.p.reset();
|
||
|
if (f22 >= 360.0f && f22 % 360.0f <= AbstractC0810PWv.e) {
|
||
|
fArr = fArr3;
|
||
|
this.p.addCircle(e.a, e.e, f16, Path.Direction.CW);
|
||
|
f5 = f14;
|
||
|
i2 = i6;
|
||
|
f2 = f12;
|
||
|
fArr2 = fArr4;
|
||
|
f3 = f11;
|
||
|
} else {
|
||
|
fArr = fArr3;
|
||
|
fArr2 = fArr4;
|
||
|
f5 = f14;
|
||
|
i2 = i6;
|
||
|
double d = f23 * 0.017453292f;
|
||
|
f3 = f11;
|
||
|
f2 = f12;
|
||
|
this.p.moveTo(e.a + (((float) Math.cos(d)) * f16), e.e + (f16 * ((float) Math.sin(d))));
|
||
|
this.p.arcTo(rectF3, f23, f24);
|
||
|
}
|
||
|
if (z3) {
|
||
|
double d2 = f20 * 0.017453292f;
|
||
|
float cos = (((float) Math.cos(d2)) * p) + e.a;
|
||
|
float sin = e.e + (((float) Math.sin(d2)) * p);
|
||
|
i = i8;
|
||
|
rectF2 = rectF3;
|
||
|
f4 = f13;
|
||
|
f6 = 0.0f;
|
||
|
f7 = c(e, p, f15 * f3, cos, sin, f20, f22);
|
||
|
} else {
|
||
|
rectF2 = rectF3;
|
||
|
f4 = f13;
|
||
|
f6 = 0.0f;
|
||
|
i = i8;
|
||
|
f7 = 0.0f;
|
||
|
}
|
||
|
this.s.set(e.a - f4, e.e - f4, e.a + f4, e.e + f4);
|
||
|
if (!z) {
|
||
|
rectF = rectF2;
|
||
|
f8 = 360.0f;
|
||
|
} else if (f4 > f6 || z3) {
|
||
|
if (z3) {
|
||
|
if (f7 < f6) {
|
||
|
f7 = -f7;
|
||
|
}
|
||
|
f9 = Math.max(f4, f7);
|
||
|
} else {
|
||
|
f9 = f4;
|
||
|
}
|
||
|
float f25 = (i2 == 1 || f9 == f6) ? f6 : u / (f9 * 0.017453292f);
|
||
|
float f26 = f25 / 2.0f;
|
||
|
float f27 = (f15 - f25) * f3;
|
||
|
if (f27 < f6) {
|
||
|
f27 = f6;
|
||
|
}
|
||
|
float f28 = ((f5 + f26) * f3) + f2 + f27;
|
||
|
if (f22 >= 360.0f && f22 % 360.0f <= AbstractC0810PWv.e) {
|
||
|
this.p.addCircle(e.a, e.e, f9, Path.Direction.CCW);
|
||
|
rectF = rectF2;
|
||
|
} else {
|
||
|
double d3 = 0.017453292f * f28;
|
||
|
rectF = rectF2;
|
||
|
this.p.lineTo(e.a + (((float) Math.cos(d3)) * f9), e.e + (f9 * ((float) Math.sin(d3))));
|
||
|
this.p.arcTo(this.s, f28, -f27);
|
||
|
}
|
||
|
this.p.close();
|
||
|
this.c.drawPath(this.p, this.e);
|
||
|
} else {
|
||
|
rectF = rectF2;
|
||
|
f8 = 360.0f;
|
||
|
}
|
||
|
if (f22 % f8 > AbstractC0810PWv.e) {
|
||
|
if (z3) {
|
||
|
double d4 = 0.017453292f * (f20 + (f22 / 2.0f));
|
||
|
this.p.lineTo(e.a + (((float) Math.cos(d4)) * f7), e.e + (f7 * ((float) Math.sin(d4))));
|
||
|
} else {
|
||
|
this.p.lineTo(e.a, e.e);
|
||
|
}
|
||
|
}
|
||
|
this.p.close();
|
||
|
this.c.drawPath(this.p, this.e);
|
||
|
}
|
||
|
i3 = i + 1;
|
||
|
uaqArr2 = uaqArr;
|
||
|
f13 = f4;
|
||
|
f11 = f3;
|
||
|
rectF3 = rectF;
|
||
|
z2 = z;
|
||
|
f10 = f;
|
||
|
fArr3 = fArr;
|
||
|
fArr4 = fArr2;
|
||
|
f12 = f2;
|
||
|
}
|
||
|
QFQ.b(e);
|
||
|
}
|
||
|
}
|