package X6FRs_4.PGPF6hQ_2.IFxWkV_5;

import X6FRs_4.PGPF6hQ_2.IFxWkV_5.IMuAHx_6;
import android.content.Context;
import android.content.res.ColorStateList;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Rect;
import android.graphics.RectF;
/* compiled from: CardViewBaseImpl.java */
/* loaded from: classes.dex */
public class PGPF6hQ_2 implements X6FRs_4 {
    public final RectF KQgRr5e_0 = new RectF();

    /* compiled from: CardViewBaseImpl.java */
    /* loaded from: classes.dex */
    public class KQgRr5e_0 implements IMuAHx_6.KQgRr5e_0 {
        public KQgRr5e_0() {
        }

        @Override // X6FRs_4.PGPF6hQ_2.IFxWkV_5.IMuAHx_6.KQgRr5e_0
        public void KQgRr5e_0(Canvas canvas, RectF rectF, float f, Paint paint) {
            float f2 = 2.0f * f;
            float width = (rectF.width() - f2) - 1.0f;
            float height = (rectF.height() - f2) - 1.0f;
            if (f >= 1.0f) {
                float f3 = f + 0.5f;
                float f4 = -f3;
                PGPF6hQ_2.this.KQgRr5e_0.set(f4, f4, f3, f3);
                int save = canvas.save();
                canvas.translate(rectF.left + f3, rectF.top + f3);
                canvas.drawArc(PGPF6hQ_2.this.KQgRr5e_0, 180.0f, 90.0f, true, paint);
                canvas.translate(width, 0.0f);
                canvas.rotate(90.0f);
                canvas.drawArc(PGPF6hQ_2.this.KQgRr5e_0, 180.0f, 90.0f, true, paint);
                canvas.translate(height, 0.0f);
                canvas.rotate(90.0f);
                canvas.drawArc(PGPF6hQ_2.this.KQgRr5e_0, 180.0f, 90.0f, true, paint);
                canvas.translate(width, 0.0f);
                canvas.rotate(90.0f);
                canvas.drawArc(PGPF6hQ_2.this.KQgRr5e_0, 180.0f, 90.0f, true, paint);
                canvas.restoreToCount(save);
                float f5 = rectF.top;
                canvas.drawRect((rectF.left + f3) - 1.0f, f5, (rectF.right - f3) + 1.0f, f5 + f3, paint);
                float f6 = rectF.bottom;
                canvas.drawRect((rectF.left + f3) - 1.0f, f6 - f3, (rectF.right - f3) + 1.0f, f6, paint);
            }
            canvas.drawRect(rectF.left, rectF.top + f, rectF.right, rectF.bottom - f, paint);
        }
    }

    @Override // X6FRs_4.PGPF6hQ_2.IFxWkV_5.X6FRs_4
    public void KQgRr5e_0() {
        IMuAHx_6.f1081KQgRr5e_0 = new KQgRr5e_0();
    }

    @Override // X6FRs_4.PGPF6hQ_2.IFxWkV_5.X6FRs_4
    public void KQgRr5e_0(Mqv2r_3 mqv2r_3) {
    }

    @Override // X6FRs_4.PGPF6hQ_2.IFxWkV_5.X6FRs_4
    public float Mqv2r_3(Mqv2r_3 mqv2r_3) {
        return KQgRr5e_0(mqv2r_3).PGPF6hQ_2();
    }

    @Override // X6FRs_4.PGPF6hQ_2.IFxWkV_5.X6FRs_4
    public void PGPF6hQ_2(Mqv2r_3 mqv2r_3) {
        Rect rect = new Rect();
        KQgRr5e_0(mqv2r_3).QxJ9d_1(rect);
        mqv2r_3.KQgRr5e_0((int) Math.ceil(QxJ9d_1(mqv2r_3)), (int) Math.ceil(Mqv2r_3(mqv2r_3)));
        mqv2r_3.setShadowPadding(rect.left, rect.top, rect.right, rect.bottom);
    }

    @Override // X6FRs_4.PGPF6hQ_2.IFxWkV_5.X6FRs_4
    public void QxJ9d_1(Mqv2r_3 mqv2r_3) {
        KQgRr5e_0(mqv2r_3).KQgRr5e_0(mqv2r_3.m522KQgRr5e_0());
        PGPF6hQ_2(mqv2r_3);
    }

    @Override // X6FRs_4.PGPF6hQ_2.IFxWkV_5.X6FRs_4
    public float X6FRs_4(Mqv2r_3 mqv2r_3) {
        return KQgRr5e_0(mqv2r_3).QxJ9d_1();
    }

    @Override // X6FRs_4.PGPF6hQ_2.IFxWkV_5.X6FRs_4
    public void KQgRr5e_0(Mqv2r_3 mqv2r_3, Context context, ColorStateList colorStateList, float f, float f2, float f3) {
        IMuAHx_6 KQgRr5e_02 = KQgRr5e_0(context, colorStateList, f, f2, f3);
        KQgRr5e_02.KQgRr5e_0(mqv2r_3.m522KQgRr5e_0());
        mqv2r_3.KQgRr5e_0(KQgRr5e_02);
        PGPF6hQ_2(mqv2r_3);
    }

    @Override // X6FRs_4.PGPF6hQ_2.IFxWkV_5.X6FRs_4
    public void QxJ9d_1(Mqv2r_3 mqv2r_3, float f) {
        KQgRr5e_0(mqv2r_3).QxJ9d_1(f);
        PGPF6hQ_2(mqv2r_3);
    }

    @Override // X6FRs_4.PGPF6hQ_2.IFxWkV_5.X6FRs_4
    public float QxJ9d_1(Mqv2r_3 mqv2r_3) {
        return KQgRr5e_0(mqv2r_3).Mqv2r_3();
    }

    public final IMuAHx_6 KQgRr5e_0(Context context, ColorStateList colorStateList, float f, float f2, float f3) {
        return new IMuAHx_6(context.getResources(), colorStateList, f, f2, f3);
    }

    @Override // X6FRs_4.PGPF6hQ_2.IFxWkV_5.X6FRs_4
    public void KQgRr5e_0(Mqv2r_3 mqv2r_3, ColorStateList colorStateList) {
        KQgRr5e_0(mqv2r_3).QxJ9d_1(colorStateList);
    }

    @Override // X6FRs_4.PGPF6hQ_2.IFxWkV_5.X6FRs_4
    public void PGPF6hQ_2(Mqv2r_3 mqv2r_3, float f) {
        KQgRr5e_0(mqv2r_3).PGPF6hQ_2(f);
    }

    @Override // X6FRs_4.PGPF6hQ_2.IFxWkV_5.X6FRs_4
    public ColorStateList KQgRr5e_0(Mqv2r_3 mqv2r_3) {
        return KQgRr5e_0(mqv2r_3).m518KQgRr5e_0();
    }

    @Override // X6FRs_4.PGPF6hQ_2.IFxWkV_5.X6FRs_4
    public float PGPF6hQ_2(Mqv2r_3 mqv2r_3) {
        return KQgRr5e_0(mqv2r_3).X6FRs_4();
    }

    @Override // X6FRs_4.PGPF6hQ_2.IFxWkV_5.X6FRs_4
    public void KQgRr5e_0(Mqv2r_3 mqv2r_3, float f) {
        KQgRr5e_0(mqv2r_3).m520KQgRr5e_0(f);
        PGPF6hQ_2(mqv2r_3);
    }

    @Override // X6FRs_4.PGPF6hQ_2.IFxWkV_5.X6FRs_4
    public float KQgRr5e_0(Mqv2r_3 mqv2r_3) {
        return KQgRr5e_0(mqv2r_3).KQgRr5e_0();
    }

    @Override // X6FRs_4.PGPF6hQ_2.IFxWkV_5.X6FRs_4
    public final IMuAHx_6 KQgRr5e_0(Mqv2r_3 mqv2r_3) {
        return (IMuAHx_6) mqv2r_3.KQgRr5e_0();
    }
}
