package com.zhihu.matisse.internal.ui.widget;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Path;
import android.graphics.RectF;
import android.util.AttributeSet;
import androidx.appcompat.widget.AppCompatImageView;

public class RoundedRectangleImageView extends AppCompatImageView {

    /* renamed from: ʬ  reason: contains not printable characters */
    public Path f3384;

    /* renamed from: ῲ  reason: contains not printable characters */
    public float f3385;

    /* renamed from: 㸾  reason: contains not printable characters */
    public RectF f3386;

    public RoundedRectangleImageView(Context context) {
        super(context);
        m1934(context);
    }

    public void onDraw(Canvas canvas) {
        canvas.clipPath(this.f3384);
        super.onDraw(canvas);
    }

    public void onMeasure(int i, int i2) {
        super.onMeasure(i, i2);
        this.f3386.set(0.0f, 0.0f, (float) getMeasuredWidth(), (float) getMeasuredHeight());
        Path path = this.f3384;
        RectF rectF = this.f3386;
        float f = this.f3385;
        path.addRoundRect(rectF, f, f, Path.Direction.CW);
    }

    /* renamed from: K  reason: contains not printable characters */
    public final void m1934(Context context) {
        this.f3385 = context.getResources().getDisplayMetrics().density * 2.0f;
        this.f3384 = new Path();
        this.f3386 = new RectF();
    }

    public RoundedRectangleImageView(Context context, AttributeSet attributeSet) {
        super(context, attributeSet);
        m1934(context);
    }

    public RoundedRectangleImageView(Context context, AttributeSet attributeSet, int i) {
        super(context, attributeSet, i);
        m1934(context);
    }
}
