导航菜单

页面标题

页面副标题

BodyTech v7.6.4 - e.java 源代码

正在查看: BodyTech v7.6.4 应用的 e.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package e7;

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.animation.ChartAnimator;
import com.github.mikephil.charting.charts.PieChart;
import com.github.mikephil.charting.data.PieDataSet$ValuePosition;
import com.github.mikephil.charting.formatter.ValueFormatter;
import com.github.mikephil.charting.highlight.Highlight;
import com.github.mikephil.charting.renderer.DataRenderer;
import com.github.mikephil.charting.utils.MPPointF;
import com.github.mikephil.charting.utils.ViewPortHandler;
import java.lang.ref.WeakReference;
import java.util.List;
import x6.j;

public class e extends DataRenderer {
    protected PieChart g;
    protected Paint h;
    protected Paint i;

    protected Paint f2718j;

    private TextPaint f2719k;

    private Paint f2720l;

    private StaticLayout f2721m;

    private CharSequence f2722n;

    private RectF f2723o;

    private RectF[] f2724p;

    protected WeakReference<Bitmap> f2725q;

    protected Canvas f2726r;

    private Path f2727s;

    private RectF f2728t;

    private Path f2729u;

    protected Path f2730v;

    protected RectF f2731w;

    public e(PieChart pieChart, ChartAnimator chartAnimator, ViewPortHandler viewPortHandler) {
        super(chartAnimator, viewPortHandler);
        this.f2723o = new RectF();
        this.f2724p = new RectF[]{new RectF(), new RectF(), new RectF()};
        this.f2727s = new Path();
        this.f2728t = new RectF();
        this.f2729u = new Path();
        this.f2730v = new Path();
        this.f2731w = new RectF();
        this.g = pieChart;
        Paint paint = new Paint(1);
        this.h = paint;
        paint.setColor(-1);
        Paint paint2 = this.h;
        Paint.Style style = Paint.Style.FILL;
        paint2.setStyle(style);
        Paint paint3 = new Paint(1);
        this.i = paint3;
        paint3.setColor(-1);
        this.i.setStyle(style);
        this.i.setAlpha(105);
        TextPaint textPaint = new TextPaint(1);
        this.f2719k = textPaint;
        textPaint.setColor(-16777216);
        this.f2719k.setTextSize(g7.d.e(12.0f));
        this.f.setTextSize(g7.d.e(13.0f));
        this.f.setColor(-1);
        Paint paint4 = this.f;
        Paint.Align align = Paint.Align.CENTER;
        paint4.setTextAlign(align);
        Paint paint5 = new Paint(1);
        this.f2720l = paint5;
        paint5.setColor(-1);
        this.f2720l.setTextAlign(align);
        this.f2720l.setTextSize(g7.d.e(13.0f));
        Paint paint6 = new Paint(1);
        this.f2718j = paint6;
        paint6.setStyle(Paint.Style.STROKE);
    }

    @Override
    public void b(Canvas canvas) {
        int n8 = (int) this.a.n();
        int m8 = (int) this.a.m();
        WeakReference<Bitmap> weakReference = this.f2725q;
        Bitmap bitmap = weakReference == null ? null : weakReference.get();
        if (bitmap == null || bitmap.getWidth() != n8 || bitmap.getHeight() != m8) {
            if (n8 <= 0 || m8 <= 0) {
                return;
            }
            bitmap = Bitmap.createBitmap(n8, m8, Bitmap.Config.ARGB_4444);
            this.f2725q = new WeakReference<>(bitmap);
            this.f2726r = new Canvas(bitmap);
        }
        bitmap.eraseColor(0);
        for (b7.h hVar : ((x6.i) this.g.getData()).i()) {
            if (hVar.isVisible() && hVar.J0() > 0) {
                j(canvas, hVar);
            }
        }
    }

    @Override
    public void c(Canvas canvas) {
        l(canvas);
        canvas.drawBitmap(this.f2725q.get(), 0.0f, 0.0f, (Paint) null);
        i(canvas);
    }

    @Override
    public void d(Canvas canvas, Highlight[] highlightArr) {
        b7.h f;
        float f8;
        int i;
        float[] fArr;
        float f9;
        int i8;
        boolean z7;
        RectF rectF;
        MPPointF mPPointF;
        int i9;
        float f10;
        float[] fArr2;
        float f11;
        float f12;
        float f13;
        float f14;
        Highlight[] highlightArr2 = highlightArr;
        boolean z8 = this.g.isDrawHoleEnabled() && !this.g.isDrawSlicesUnderHoleEnabled();
        if (z8 && this.g.isDrawRoundedSlicesEnabled()) {
            return;
        }
        float h = this.b.h();
        float i10 = this.b.i();
        float rotationAngle = this.g.getRotationAngle();
        float[] drawAngles = this.g.getDrawAngles();
        float[] absoluteAngles = this.g.getAbsoluteAngles();
        MPPointF centerCircleBox = this.g.getCenterCircleBox();
        float radius = this.g.getRadius();
        float holeRadius = z8 ? (this.g.getHoleRadius() / 100.0f) * radius : 0.0f;
        RectF rectF2 = this.f2731w;
        rectF2.set(0.0f, 0.0f, 0.0f, 0.0f);
        int i11 = 0;
        while (i11 < highlightArr2.length) {
            int h8 = (int) highlightArr2[i11].h();
            if (h8 < drawAngles.length && (f = ((x6.i) this.g.getData()).f(highlightArr2[i11].d())) != null && f.M0()) {
                int J0 = f.J0();
                int i12 = 0;
                for (int i13 = 0; i13 < J0; i13++) {
                    if (Math.abs(f.r(i13).e()) > g7.d.e) {
                        i12++;
                    }
                }
                if (h8 == 0) {
                    i = 1;
                    f8 = 0.0f;
                } else {
                    f8 = absoluteAngles[h8 - 1] * h;
                    i = 1;
                }
                float T = i12 <= i ? 0.0f : f.T();
                float f15 = drawAngles[h8];
                float F = f.F();
                int i14 = i11;
                float f16 = radius + F;
                float f17 = holeRadius;
                rectF2.set(this.g.getCircleBox());
                float f18 = -F;
                rectF2.inset(f18, f18);
                boolean z9 = T > 0.0f && f15 <= 180.0f;
                this.c.setColor(f.p0(h8));
                float f19 = i12 == 1 ? 0.0f : T / (radius * 0.017453292f);
                float f20 = i12 == 1 ? 0.0f : T / (f16 * 0.017453292f);
                float f21 = rotationAngle + (((f19 / 2.0f) + f8) * i10);
                float f22 = (f15 - f19) * i10;
                float f23 = f22 < 0.0f ? 0.0f : f22;
                float f24 = (((f20 / 2.0f) + f8) * i10) + rotationAngle;
                float f25 = (f15 - f20) * i10;
                if (f25 < 0.0f) {
                    f25 = 0.0f;
                }
                this.f2727s.reset();
                if (f23 < 360.0f || f23 % 360.0f > g7.d.e) {
                    fArr = drawAngles;
                    f9 = f8;
                    double d = f24 * 0.017453292f;
                    i8 = i12;
                    z7 = z8;
                    this.f2727s.moveTo(centerCircleBox.e + (((float) Math.cos(d)) * f16), centerCircleBox.f2475k + (f16 * ((float) Math.sin(d))));
                    this.f2727s.arcTo(rectF2, f24, f25);
                } else {
                    this.f2727s.addCircle(centerCircleBox.e, centerCircleBox.f2475k, f16, Path.Direction.CW);
                    fArr = drawAngles;
                    f9 = f8;
                    i8 = i12;
                    z7 = z8;
                }
                if (z9) {
                    double d8 = f21 * 0.017453292f;
                    i9 = i14;
                    rectF = rectF2;
                    f10 = f17;
                    mPPointF = centerCircleBox;
                    fArr2 = fArr;
                    f11 = h(centerCircleBox, radius, f15 * i10, (((float) Math.cos(d8)) * radius) + centerCircleBox.e, centerCircleBox.f2475k + (((float) Math.sin(d8)) * radius), f21, f23);
                } else {
                    rectF = rectF2;
                    mPPointF = centerCircleBox;
                    i9 = i14;
                    f10 = f17;
                    fArr2 = fArr;
                    f11 = 0.0f;
                }
                RectF rectF3 = this.f2728t;
                float f26 = mPPointF.e;
                float f27 = mPPointF.f2475k;
                rectF3.set(f26 - f10, f27 - f10, f26 + f10, f27 + f10);
                if (!z7 || (f10 <= 0.0f && !z9)) {
                    f12 = h;
                    f13 = i10;
                    if (f23 % 360.0f > g7.d.e) {
                        if (z9) {
                            double d9 = (f21 + (f23 / 2.0f)) * 0.017453292f;
                            this.f2727s.lineTo(mPPointF.e + (((float) Math.cos(d9)) * f11), mPPointF.f2475k + (f11 * ((float) Math.sin(d9))));
                        } else {
                            this.f2727s.lineTo(mPPointF.e, mPPointF.f2475k);
                        }
                    }
                } else {
                    if (z9) {
                        if (f11 < 0.0f) {
                            f11 = -f11;
                        }
                        f14 = Math.max(f10, f11);
                    } else {
                        f14 = f10;
                    }
                    float f28 = (i8 == 1 || f14 == 0.0f) ? 0.0f : T / (f14 * 0.017453292f);
                    float f29 = ((f9 + (f28 / 2.0f)) * i10) + rotationAngle;
                    float f30 = (f15 - f28) * i10;
                    if (f30 < 0.0f) {
                        f30 = 0.0f;
                    }
                    float f31 = f29 + f30;
                    if (f23 < 360.0f || f23 % 360.0f > g7.d.e) {
                        double d10 = f31 * 0.017453292f;
                        f12 = h;
                        f13 = i10;
                        this.f2727s.lineTo(mPPointF.e + (((float) Math.cos(d10)) * f14), mPPointF.f2475k + (f14 * ((float) Math.sin(d10))));
                        this.f2727s.arcTo(this.f2728t, f31, -f30);
                    } else {
                        this.f2727s.addCircle(mPPointF.e, mPPointF.f2475k, f14, Path.Direction.CCW);
                        f12 = h;
                        f13 = i10;
                    }
                }
                this.f2727s.close();
                this.f2726r.drawPath(this.f2727s, this.c);
            } else {
                i9 = i11;
                rectF = rectF2;
                f10 = holeRadius;
                fArr2 = drawAngles;
                z7 = z8;
                f12 = h;
                f13 = i10;
                mPPointF = centerCircleBox;
            }
            i11 = i9 + 1;
            h = f12;
            rectF2 = rectF;
            holeRadius = f10;
            centerCircleBox = mPPointF;
            i10 = f13;
            drawAngles = fArr2;
            z8 = z7;
            highlightArr2 = highlightArr;
        }
        MPPointF.f(centerCircleBox);
    }

    @Override
    public void e(Canvas canvas) {
        int i;
        List<b7.h> list;
        float[] fArr;
        float[] fArr2;
        float f;
        float f8;
        float f9;
        MPPointF mPPointF;
        float f10;
        Canvas canvas2;
        PieDataSet$ValuePosition pieDataSet$ValuePosition;
        float f11;
        float f12;
        float f13;
        float f14;
        float f15;
        MPPointF mPPointF2;
        j jVar;
        MPPointF mPPointF3;
        b7.h hVar;
        float f16;
        Canvas canvas3;
        String str;
        String str2;
        Canvas canvas4;
        MPPointF mPPointF4;
        MPPointF mPPointF5;
        Canvas canvas5 = canvas;
        MPPointF centerCircleBox = this.g.getCenterCircleBox();
        float radius = this.g.getRadius();
        float rotationAngle = this.g.getRotationAngle();
        float[] drawAngles = this.g.getDrawAngles();
        float[] absoluteAngles = this.g.getAbsoluteAngles();
        float h = this.b.h();
        float i8 = this.b.i();
        float holeRadius = (radius - ((this.g.getHoleRadius() * radius) / 100.0f)) / 2.0f;
        float holeRadius2 = this.g.getHoleRadius() / 100.0f;
        float f17 = (radius / 10.0f) * 3.6f;
        if (this.g.isDrawHoleEnabled()) {
            f17 = (radius - (radius * holeRadius2)) / 2.0f;
            if (!this.g.isDrawSlicesUnderHoleEnabled() && this.g.isDrawRoundedSlicesEnabled()) {
                rotationAngle = (float) (rotationAngle + ((holeRadius * 360.0f) / (radius * 6.283185307179586d)));
            }
        }
        float f18 = rotationAngle;
        float f19 = radius - f17;
        x6.i iVar = (x6.i) this.g.getData();
        List<b7.h> i9 = iVar.i();
        float y8 = iVar.y();
        boolean isDrawEntryLabelsEnabled = this.g.isDrawEntryLabelsEnabled();
        canvas.save();
        float e = g7.d.e(5.0f);
        int i10 = 0;
        int i11 = 0;
        while (i11 < i9.size()) {
            b7.h hVar2 = i9.get(i11);
            boolean H = hVar2.H();
            if (H || isDrawEntryLabelsEnabled) {
                PieDataSet$ValuePosition q02 = hVar2.q0();
                PieDataSet$ValuePosition x02 = hVar2.x0();
                a(hVar2);
                int i12 = i10;
                i = i11;
                float a = g7.d.a(this.f, "Q") + g7.d.e(4.0f);
                ValueFormatter p8 = hVar2.p();
                int J0 = hVar2.J0();
                list = i9;
                this.f2718j.setColor(hVar2.n0());
                this.f2718j.setStrokeWidth(g7.d.e(hVar2.t()));
                float r8 = r(hVar2);
                MPPointF d = MPPointF.d(hVar2.K0());
                MPPointF mPPointF6 = centerCircleBox;
                d.e = g7.d.e(d.e);
                d.f2475k = g7.d.e(d.f2475k);
                int i13 = 0;
                while (i13 < J0) {
                    MPPointF mPPointF7 = d;
                    j r9 = hVar2.r(i13);
                    int i14 = J0;
                    float f20 = f18 + (((i12 == 0 ? 0.0f : absoluteAngles[i12 - 1] * h) + ((drawAngles[i12] - ((r8 / (f19 * 0.017453292f)) / 2.0f)) / 2.0f)) * i8);
                    float f21 = r8;
                    String g = p8.g(this.g.isUsePercentValuesEnabled() ? (r9.e() / y8) * 100.0f : r9.e(), r9);
                    float[] fArr3 = drawAngles;
                    String q8 = r9.q();
                    ValueFormatter valueFormatter = p8;
                    double d8 = f20 * 0.017453292f;
                    float[] fArr4 = absoluteAngles;
                    float f22 = h;
                    float cos = (float) Math.cos(d8);
                    float f23 = i8;
                    float sin = (float) Math.sin(d8);
                    boolean z7 = isDrawEntryLabelsEnabled && q02 == PieDataSet$ValuePosition.OUTSIDE_SLICE;
                    float f24 = f18;
                    boolean z8 = H && x02 == PieDataSet$ValuePosition.OUTSIDE_SLICE;
                    boolean z9 = isDrawEntryLabelsEnabled && q02 == PieDataSet$ValuePosition.INSIDE_SLICE;
                    PieDataSet$ValuePosition pieDataSet$ValuePosition2 = q02;
                    boolean z10 = H && x02 == PieDataSet$ValuePosition.INSIDE_SLICE;
                    if (z7 || z8) {
                        float u8 = hVar2.u();
                        float B = hVar2.B();
                        float E0 = hVar2.E0() / 100.0f;
                        pieDataSet$ValuePosition = x02;
                        if (this.g.isDrawHoleEnabled()) {
                            float f25 = radius * holeRadius2;
                            f11 = ((radius - f25) * E0) + f25;
                        } else {
                            f11 = radius * E0;
                        }
                        float abs = hVar2.y0() ? B * f19 * ((float) Math.abs(Math.sin(d8))) : B * f19;
                        MPPointF mPPointF8 = mPPointF6;
                        float f26 = mPPointF8.e;
                        float f27 = (f11 * cos) + f26;
                        f12 = radius;
                        float f28 = mPPointF8.f2475k;
                        float f29 = (f11 * sin) + f28;
                        float f30 = (u8 + 1.0f) * f19;
                        float f31 = (f30 * cos) + f26;
                        float f32 = f28 + (f30 * sin);
                        double d9 = f20 % 360.0d;
                        if (d9 < 90.0d || d9 > 270.0d) {
                            f13 = f31 + abs;
                            Paint paint = this.f;
                            Paint.Align align = Paint.Align.LEFT;
                            paint.setTextAlign(align);
                            if (z7) {
                                this.f2720l.setTextAlign(align);
                            }
                            f14 = f13 + e;
                        } else {
                            float f33 = f31 - abs;
                            Paint paint2 = this.f;
                            Paint.Align align2 = Paint.Align.RIGHT;
                            paint2.setTextAlign(align2);
                            if (z7) {
                                this.f2720l.setTextAlign(align2);
                            }
                            f13 = f33;
                            f14 = f33 - e;
                        }
                        if (hVar2.n0() != 1122867) {
                            if (hVar2.z0()) {
                                this.f2718j.setColor(hVar2.p0(i13));
                            }
                            f15 = sin;
                            hVar = hVar2;
                            mPPointF2 = mPPointF7;
                            jVar = r9;
                            mPPointF3 = mPPointF8;
                            f16 = f14;
                            canvas.drawLine(f27, f29, f31, f32, this.f2718j);
                            canvas.drawLine(f31, f32, f13, f32, this.f2718j);
                        } else {
                            f15 = sin;
                            mPPointF2 = mPPointF7;
                            jVar = r9;
                            mPPointF3 = mPPointF8;
                            hVar = hVar2;
                            f16 = f14;
                        }
                        if (z7 && z8) {
                            m(canvas, g, f16, f32, hVar.x(i13));
                            if (i13 >= iVar.j() || q8 == null) {
                                canvas4 = canvas;
                                str2 = q8;
                            } else {
                                canvas3 = canvas;
                                str = q8;
                                k(canvas3, str, f16, f32 + a);
                                str2 = str;
                                canvas4 = canvas3;
                            }
                        } else {
                            canvas3 = canvas;
                            float f34 = f16;
                            str = q8;
                            if (z7) {
                                if (i13 < iVar.j() && str != null) {
                                    k(canvas3, str, f34, f32 + (a / 2.0f));
                                }
                            } else if (z8) {
                                str2 = str;
                                canvas4 = canvas3;
                                m(canvas, g, f34, f32 + (a / 2.0f), hVar.x(i13));
                            }
                            str2 = str;
                            canvas4 = canvas3;
                        }
                    } else {
                        pieDataSet$ValuePosition = x02;
                        f15 = sin;
                        mPPointF3 = mPPointF6;
                        mPPointF2 = mPPointF7;
                        jVar = r9;
                        str2 = q8;
                        hVar = hVar2;
                        f12 = radius;
                        canvas4 = canvas;
                    }
                    if (z9 || z10) {
                        mPPointF4 = mPPointF3;
                        float f35 = (f19 * cos) + mPPointF4.e;
                        float f36 = (f19 * f15) + mPPointF4.f2475k;
                        this.f.setTextAlign(Paint.Align.CENTER);
                        if (z9 && z10) {
                            m(canvas, g, f35, f36, hVar.x(i13));
                            if (i13 < iVar.j() && str2 != null) {
                                k(canvas4, str2, f35, f36 + a);
                            }
                        } else {
                            if (z9) {
                                if (i13 < iVar.j() && str2 != null) {
                                    k(canvas4, str2, f35, f36 + (a / 2.0f));
                                }
                            } else if (z10) {
                                m(canvas, g, f35, f36 + (a / 2.0f), hVar.x(i13));
                            }
                            if (jVar.c() == null && hVar.c0()) {
                                Drawable c = jVar.c();
                                mPPointF5 = mPPointF2;
                                float f37 = mPPointF5.f2475k;
                                g7.d.f(canvas, c, (int) (((f19 + f37) * cos) + mPPointF4.e), (int) (((f37 + f19) * f15) + mPPointF4.f2475k + mPPointF5.e), c.getIntrinsicWidth(), c.getIntrinsicHeight());
                            } else {
                                mPPointF5 = mPPointF2;
                            }
                            i12++;
                            i13++;
                            d = mPPointF5;
                            hVar2 = hVar;
                            radius = f12;
                            r8 = f21;
                            J0 = i14;
                            drawAngles = fArr3;
                            p8 = valueFormatter;
                            absoluteAngles = fArr4;
                            h = f22;
                            f18 = f24;
                            q02 = pieDataSet$ValuePosition2;
                            x02 = pieDataSet$ValuePosition;
                            mPPointF6 = mPPointF4;
                            i8 = f23;
                        }
                    } else {
                        mPPointF4 = mPPointF3;
                    }
                    if (jVar.c() == null) {
                    }
                    mPPointF5 = mPPointF2;
                    i12++;
                    i13++;
                    d = mPPointF5;
                    hVar2 = hVar;
                    radius = f12;
                    r8 = f21;
                    J0 = i14;
                    drawAngles = fArr3;
                    p8 = valueFormatter;
                    absoluteAngles = fArr4;
                    h = f22;
                    f18 = f24;
                    q02 = pieDataSet$ValuePosition2;
                    x02 = pieDataSet$ValuePosition;
                    mPPointF6 = mPPointF4;
                    i8 = f23;
                }
                fArr = drawAngles;
                fArr2 = absoluteAngles;
                f = h;
                f8 = i8;
                f9 = f18;
                mPPointF = mPPointF6;
                f10 = radius;
                canvas2 = canvas;
                MPPointF.f(d);
                i10 = i12;
            } else {
                i = i11;
                list = i9;
                f10 = radius;
                fArr = drawAngles;
                fArr2 = absoluteAngles;
                f = h;
                f8 = i8;
                f9 = f18;
                canvas2 = canvas5;
                mPPointF = centerCircleBox;
            }
            i11 = i + 1;
            canvas5 = canvas2;
            centerCircleBox = mPPointF;
            i9 = list;
            radius = f10;
            drawAngles = fArr;
            absoluteAngles = fArr2;
            h = f;
            i8 = f8;
            f18 = f9;
        }
        MPPointF.f(centerCircleBox);
        canvas.restore();
    }

    protected float h(MPPointF mPPointF, float f, float f8, float f9, float f10, float f11, float f12) {
        double d = (f11 + f12) * 0.017453292f;
        float cos = mPPointF.e + (((float) Math.cos(d)) * f);
        float sin = mPPointF.f2475k + (((float) Math.sin(d)) * f);
        double d8 = (f11 + (f12 / 2.0f)) * 0.017453292f;
        return (float) ((f - ((float) ((Math.sqrt(Math.pow(cos - f9, 2.0d) + Math.pow(sin - f10, 2.0d)) / 2.0d) * Math.tan(((180.0d - f8) / 2.0d) * 0.017453292519943295d)))) - Math.sqrt(Math.pow((mPPointF.e + (((float) Math.cos(d8)) * f)) - ((cos + f9) / 2.0f), 2.0d) + Math.pow((mPPointF.f2475k + (((float) Math.sin(d8)) * f)) - ((sin + f10) / 2.0f), 2.0d)));
    }

    protected void i(Canvas canvas) {
        MPPointF mPPointF;
        CharSequence centerText = this.g.getCenterText();
        if (!this.g.isDrawCenterTextEnabled() || centerText == null) {
            return;
        }
        MPPointF centerCircleBox = this.g.getCenterCircleBox();
        MPPointF centerTextOffset = this.g.getCenterTextOffset();
        float f = centerCircleBox.e + centerTextOffset.e;
        float f8 = centerCircleBox.f2475k + centerTextOffset.f2475k;
        float radius = (!this.g.isDrawHoleEnabled() || this.g.isDrawSlicesUnderHoleEnabled()) ? this.g.getRadius() : this.g.getRadius() * (this.g.getHoleRadius() / 100.0f);
        RectF[] rectFArr = this.f2724p;
        RectF rectF = rectFArr[0];
        rectF.left = f - radius;
        rectF.top = f8 - radius;
        rectF.right = f + radius;
        rectF.bottom = f8 + radius;
        RectF rectF2 = rectFArr[1];
        rectF2.set(rectF);
        float centerTextRadiusPercent = this.g.getCenterTextRadiusPercent() / 100.0f;
        if (centerTextRadiusPercent > 0.0d) {
            rectF2.inset((rectF2.width() - (rectF2.width() * centerTextRadiusPercent)) / 2.0f, (rectF2.height() - (rectF2.height() * centerTextRadiusPercent)) / 2.0f);
        }
        if (centerText.equals(this.f2722n) && rectF2.equals(this.f2723o)) {
            mPPointF = centerTextOffset;
        } else {
            this.f2723o.set(rectF2);
            this.f2722n = centerText;
            mPPointF = centerTextOffset;
            this.f2721m = new StaticLayout(centerText, 0, centerText.length(), this.f2719k, (int) Math.max(Math.ceil(this.f2723o.width()), 1.0d), Layout.Alignment.ALIGN_CENTER, 1.0f, 0.0f, false);
        }
        float height = this.f2721m.getHeight();
        canvas.save();
        Path path = this.f2730v;
        path.reset();
        path.addOval(rectF, Path.Direction.CW);
        canvas.clipPath(path);
        canvas.translate(rectF2.left, rectF2.top + ((rectF2.height() - height) / 2.0f));
        this.f2721m.draw(canvas);
        canvas.restore();
        MPPointF.f(centerCircleBox);
        MPPointF.f(mPPointF);
    }

    protected void j(Canvas canvas, b7.h hVar) {
        int i;
        int i8;
        int i9;
        float f;
        float f8;
        float[] fArr;
        float f9;
        float f10;
        int i10;
        RectF rectF;
        RectF rectF2;
        MPPointF mPPointF;
        float f11;
        MPPointF mPPointF2;
        int i11;
        float f12;
        MPPointF mPPointF3;
        b7.h hVar2 = hVar;
        float rotationAngle = this.g.getRotationAngle();
        float h = this.b.h();
        float i12 = this.b.i();
        RectF circleBox = this.g.getCircleBox();
        int J0 = hVar.J0();
        float[] drawAngles = this.g.getDrawAngles();
        MPPointF centerCircleBox = this.g.getCenterCircleBox();
        float radius = this.g.getRadius();
        boolean z7 = this.g.isDrawHoleEnabled() && !this.g.isDrawSlicesUnderHoleEnabled();
        float holeRadius = z7 ? (this.g.getHoleRadius() / 100.0f) * radius : 0.0f;
        float holeRadius2 = (radius - ((this.g.getHoleRadius() * radius) / 100.0f)) / 2.0f;
        RectF rectF3 = new RectF();
        boolean z8 = z7 && this.g.isDrawRoundedSlicesEnabled();
        int i13 = 0;
        for (int i14 = 0; i14 < J0; i14++) {
            if (Math.abs(hVar2.r(i14).e()) > g7.d.e) {
                i13++;
            }
        }
        float r8 = i13 <= 1 ? 0.0f : r(hVar2);
        int i15 = 0;
        float f13 = 0.0f;
        while (i15 < J0) {
            float f14 = drawAngles[i15];
            float abs = Math.abs(hVar2.r(i15).e());
            float f15 = g7.d.e;
            if (abs > f15 && (!this.g.needsHighlight(i15) || z8)) {
                boolean z9 = r8 > 0.0f && f14 <= 180.0f;
                i = J0;
                this.c.setColor(hVar2.p0(i15));
                float f16 = i13 == 1 ? 0.0f : r8 / (radius * 0.017453292f);
                float f17 = rotationAngle + ((f13 + (f16 / 2.0f)) * i12);
                float f18 = (f14 - f16) * i12;
                float f19 = f18 < 0.0f ? 0.0f : f18;
                this.f2727s.reset();
                if (z8) {
                    float f20 = radius - holeRadius2;
                    i8 = i15;
                    i9 = i13;
                    double d = f17 * 0.017453292f;
                    f = rotationAngle;
                    f8 = h;
                    float cos = centerCircleBox.e + (((float) Math.cos(d)) * f20);
                    float sin = centerCircleBox.f2475k + (f20 * ((float) Math.sin(d)));
                    rectF3.set(cos - holeRadius2, sin - holeRadius2, cos + holeRadius2, sin + holeRadius2);
                } else {
                    i8 = i15;
                    i9 = i13;
                    f = rotationAngle;
                    f8 = h;
                }
                double d8 = f17 * 0.017453292f;
                float f21 = holeRadius;
                float cos2 = centerCircleBox.e + (((float) Math.cos(d8)) * radius);
                float sin2 = centerCircleBox.f2475k + (((float) Math.sin(d8)) * radius);
                if (f19 < 360.0f || f19 % 360.0f > f15) {
                    fArr = drawAngles;
                    if (z8) {
                        this.f2727s.arcTo(rectF3, f17 + 180.0f, -180.0f);
                    }
                    this.f2727s.arcTo(circleBox, f17, f19);
                } else {
                    fArr = drawAngles;
                    this.f2727s.addCircle(centerCircleBox.e, centerCircleBox.f2475k, radius, Path.Direction.CW);
                }
                RectF rectF4 = this.f2728t;
                float f22 = centerCircleBox.e;
                float f23 = centerCircleBox.f2475k;
                RectF rectF5 = rectF3;
                rectF4.set(f22 - f21, f23 - f21, f22 + f21, f23 + f21);
                if (!z7) {
                    f9 = radius;
                    f10 = f21;
                    i10 = i9;
                    rectF = rectF5;
                    rectF2 = circleBox;
                    mPPointF = centerCircleBox;
                    f11 = 360.0f;
                } else if (f21 > 0.0f || z9) {
                    if (z9) {
                        i10 = i9;
                        rectF2 = circleBox;
                        f10 = f21;
                        i11 = 1;
                        f9 = radius;
                        mPPointF2 = centerCircleBox;
                        float h8 = h(centerCircleBox, radius, f14 * i12, cos2, sin2, f17, f19);
                        if (h8 < 0.0f) {
                            h8 = -h8;
                        }
                        f12 = Math.max(f10, h8);
                    } else {
                        f9 = radius;
                        mPPointF2 = centerCircleBox;
                        f10 = f21;
                        i10 = i9;
                        rectF2 = circleBox;
                        i11 = 1;
                        f12 = f10;
                    }
                    float f24 = (i10 == i11 || f12 == 0.0f) ? 0.0f : r8 / (f12 * 0.017453292f);
                    float f25 = f + ((f13 + (f24 / 2.0f)) * i12);
                    float f26 = (f14 - f24) * i12;
                    if (f26 < 0.0f) {
                        f26 = 0.0f;
                    }
                    float f27 = f25 + f26;
                    if (f19 < 360.0f || f19 % 360.0f > f15) {
                        if (z8) {
                            float f28 = f9 - holeRadius2;
                            double d9 = 0.017453292f * f27;
                            mPPointF3 = mPPointF2;
                            float cos3 = mPPointF2.e + (((float) Math.cos(d9)) * f28);
                            float sin3 = mPPointF3.f2475k + (f28 * ((float) Math.sin(d9)));
                            rectF = rectF5;
                            rectF.set(cos3 - holeRadius2, sin3 - holeRadius2, cos3 + holeRadius2, sin3 + holeRadius2);
                            this.f2727s.arcTo(rectF, f27, 180.0f);
                        } else {
                            mPPointF3 = mPPointF2;
                            rectF = rectF5;
                            double d10 = f27 * 0.017453292f;
                            this.f2727s.lineTo(mPPointF3.e + (((float) Math.cos(d10)) * f12), mPPointF3.f2475k + (f12 * ((float) Math.sin(d10))));
                        }
                        this.f2727s.arcTo(this.f2728t, f27, -f26);
                    } else {
                        this.f2727s.addCircle(mPPointF2.e, mPPointF2.f2475k, f12, Path.Direction.CCW);
                        mPPointF3 = mPPointF2;
                        rectF = rectF5;
                    }
                    mPPointF = mPPointF3;
                    this.f2727s.close();
                    this.f2726r.drawPath(this.f2727s, this.c);
                    f13 += f14 * f8;
                } else {
                    f9 = radius;
                    f10 = f21;
                    i10 = i9;
                    rectF = rectF5;
                    f11 = 360.0f;
                    rectF2 = circleBox;
                    mPPointF = centerCircleBox;
                }
                if (f19 % f11 > f15) {
                    if (z9) {
                        float h9 = h(mPPointF, f9, f14 * i12, cos2, sin2, f17, f19);
                        double d11 = 0.017453292f * (f17 + (f19 / 2.0f));
                        this.f2727s.lineTo(mPPointF.e + (((float) Math.cos(d11)) * h9), mPPointF.f2475k + (h9 * ((float) Math.sin(d11))));
                    } else {
                        this.f2727s.lineTo(mPPointF.e, mPPointF.f2475k);
                    }
                }
                this.f2727s.close();
                this.f2726r.drawPath(this.f2727s, this.c);
                f13 += f14 * f8;
            } else {
                f13 += f14 * h;
                i8 = i15;
                f9 = radius;
                f = rotationAngle;
                f8 = h;
                rectF2 = circleBox;
                i = J0;
                fArr = drawAngles;
                i10 = i13;
                rectF = rectF3;
                f10 = holeRadius;
                mPPointF = centerCircleBox;
            }
            i15 = i8 + 1;
            hVar2 = hVar;
            holeRadius = f10;
            rectF3 = rectF;
            centerCircleBox = mPPointF;
            i13 = i10;
            radius = f9;
            J0 = i;
            circleBox = rectF2;
            rotationAngle = f;
            h = f8;
            drawAngles = fArr;
        }
        MPPointF.f(centerCircleBox);
    }

    protected void k(Canvas canvas, String str, float f, float f8) {
        canvas.drawText(str, f, f8, this.f2720l);
    }

    protected void l(Canvas canvas) {
        if (!this.g.isDrawHoleEnabled() || this.f2726r == null) {
            return;
        }
        float radius = this.g.getRadius();
        float holeRadius = (this.g.getHoleRadius() / 100.0f) * radius;
        MPPointF centerCircleBox = this.g.getCenterCircleBox();
        if (Color.alpha(this.h.getColor()) > 0) {
            this.f2726r.drawCircle(centerCircleBox.e, centerCircleBox.f2475k, holeRadius, this.h);
        }
        if (Color.alpha(this.i.getColor()) > 0 && this.g.getTransparentCircleRadius() > this.g.getHoleRadius()) {
            int alpha = this.i.getAlpha();
            float transparentCircleRadius = radius * (this.g.getTransparentCircleRadius() / 100.0f);
            this.i.setAlpha((int) (alpha * this.b.h() * this.b.i()));
            this.f2729u.reset();
            this.f2729u.addCircle(centerCircleBox.e, centerCircleBox.f2475k, transparentCircleRadius, Path.Direction.CW);
            this.f2729u.addCircle(centerCircleBox.e, centerCircleBox.f2475k, holeRadius, Path.Direction.CCW);
            this.f2726r.drawPath(this.f2729u, this.i);
            this.i.setAlpha(alpha);
        }
        MPPointF.f(centerCircleBox);
    }

    public void m(Canvas canvas, String str, float f, float f8, int i) {
        this.f.setColor(i);
        canvas.drawText(str, f, f8, this.f);
    }

    public TextPaint n() {
        return this.f2719k;
    }

    public Paint o() {
        return this.f2720l;
    }

    public Paint p() {
        return this.h;
    }

    public Paint q() {
        return this.i;
    }

    protected float r(b7.h hVar) {
        if (!hVar.q()) {
            return hVar.T();
        }
        if (hVar.T() / this.a.t() > (hVar.l() / ((x6.i) this.g.getData()).y()) * 2.0f) {
            return 0.0f;
        }
        return hVar.T();
    }

    public void s() {
        Canvas canvas = this.f2726r;
        if (canvas != null) {
            canvas.setBitmap(null);
            this.f2726r = null;
        }
        WeakReference<Bitmap> weakReference = this.f2725q;
        if (weakReference != null) {
            Bitmap bitmap = weakReference.get();
            if (bitmap != null) {
                bitmap.recycle();
            }
            this.f2725q.clear();
            this.f2725q = null;
        }
    }

    @Override
    public void f() {
    }
}