package com.scwang.smartrefresh.layout.header.bezierradar;

import android.content.Context;
import android.content.res.Resources;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.view.View;
import ඓ.㿎.K.ῲ.䀟.C1436;

public class RoundDotView extends View {

    /* renamed from: ʬ  reason: contains not printable characters */
    public Paint f3312 = new Paint();

    /* renamed from: ඓ  reason: contains not printable characters */
    public float f3313;

    /* renamed from: ῲ  reason: contains not printable characters */
    public int f3314 = 7;

    /* renamed from: 㸾  reason: contains not printable characters */
    public float f3315;

    public RoundDotView(Context context) {
        super(context);
        this.f3312.setAntiAlias(true);
        this.f3312.setColor(-1);
        this.f3315 = (float) C1436.m3649(7.0f);
    }

    public void onDraw(Canvas canvas) {
        super.onDraw(canvas);
        int width = getWidth();
        int height = getHeight();
        float f = (float) (width / this.f3314);
        float f2 = this.f3313;
        float f3 = 0.0f;
        float f4 = (f * f2) - (f2 > 1.0f ? ((f2 - 1.0f) * f) / f2 : 0.0f);
        float f5 = (float) height;
        float f6 = this.f3313;
        float f7 = 2.0f;
        if (f6 > 1.0f) {
            f3 = (((f6 - 1.0f) * f5) / 2.0f) / f6;
        }
        float f8 = f5 - f3;
        int i = 0;
        while (true) {
            int i2 = this.f3314;
            if (i < i2) {
                float f9 = (((float) i) + 1.0f) - ((((float) i2) + 1.0f) / f7);
                float f10 = f5 / Resources.getSystem().getDisplayMetrics().density;
                this.f3312.setAlpha((int) ((1.0d - (1.0d / Math.pow((((double) f10) / 800.0d) + 1.0d, 15.0d))) * ((double) ((1.0f - ((Math.abs(f9) / ((float) this.f3314)) * f7)) * 255.0f))));
                float f11 = (1.0f - (1.0f / ((f10 / 10.0f) + 1.0f))) * this.f3315;
                canvas.drawCircle((f9 * f4) + (((float) (width / 2)) - (f11 / 2.0f)), f8 / 2.0f, f11, this.f3312);
                i++;
                f4 = f4;
                f7 = 2.0f;
            } else {
                return;
            }
        }
    }

    public void onMeasure(int i, int i2) {
        setMeasuredDimension(View.resolveSize(getSuggestedMinimumWidth(), i), View.resolveSize(getSuggestedMinimumHeight(), i2));
    }

    public void setDotColor(int i) {
        this.f3312.setColor(i);
    }

    public void setFraction(float f) {
        this.f3313 = f;
    }
}
