package com.bytedance.sdk.openadsdk.core.widget;

import android.annotation.SuppressLint;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.RectF;

/* JADX INFO: loaded from: classes2.dex */
@SuppressLint({"AppCompatCustomView"})
public class onz extends com.bytedance.sdk.openadsdk.core.ajl.yz {
    private Paint fm;
    private RectF ro;

    public onz(Context context) {
        super(context);
        fm();
    }

    private void fm() {
        Paint paint = new Paint();
        this.fm = paint;
        paint.setStyle(Paint.Style.FILL_AND_STROKE);
        this.fm.setColor(Color.parseColor("#99333333"));
        this.fm.setAntiAlias(true);
        this.fm.setStrokeWidth(0.0f);
        this.ro = new RectF();
    }

    @Override // android.widget.ImageView, android.view.View
    public void onDraw(Canvas canvas) {
        RectF rectF = this.ro;
        canvas.drawRoundRect(rectF, rectF.right / 2.0f, rectF.bottom / 2.0f, this.fm);
        super.onDraw(canvas);
    }

    @Override // com.bytedance.sdk.openadsdk.core.ajl.yz, android.widget.ImageView, android.view.View
    public void onMeasure(int i10, int i11) {
        super.onMeasure(i10, i11);
        if (this.ro.right == getMeasuredWidth() && this.ro.bottom == getMeasuredHeight()) {
            return;
        }
        this.ro.set(0.0f, 0.0f, getMeasuredWidth(), getMeasuredHeight());
    }
}
