package com.bytedance.sdk.component.adexpress.ajl;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.RectF;
import android.view.View;

/* JADX INFO: loaded from: classes.dex */
public class ef extends View {
    private int ajl;
    private int fm;
    private Paint jnr;

    /* JADX INFO: renamed from: lb, reason: collision with root package name */
    private final RectF f6434lb;
    private int ro;
    private Paint wsy;
    private int wu;
    private Paint yz;

    public ef(Context context) {
        super(context);
        this.f6434lb = new RectF();
        fm();
    }

    private void fm() {
        Paint paint = new Paint();
        this.yz = paint;
        paint.setAntiAlias(true);
        Paint paint2 = new Paint();
        this.wsy = paint2;
        paint2.setAntiAlias(true);
        Paint paint3 = new Paint();
        this.jnr = paint3;
        paint3.setAntiAlias(true);
    }

    @Override // android.view.View
    public void onDraw(Canvas canvas) {
        super.onDraw(canvas);
        RectF rectF = this.f6434lb;
        int i10 = this.ajl;
        canvas.drawRoundRect(rectF, i10, i10, this.jnr);
        RectF rectF2 = this.f6434lb;
        int i11 = this.ajl;
        canvas.drawRoundRect(rectF2, i11, i11, this.yz);
        int i12 = this.fm;
        int i13 = this.ro;
        canvas.drawLine(i12 * 0.3f, i13 * 0.3f, i12 * 0.7f, i13 * 0.7f, this.wsy);
        int i14 = this.fm;
        int i15 = this.ro;
        canvas.drawLine(i14 * 0.7f, i15 * 0.3f, i14 * 0.3f, i15 * 0.7f, this.wsy);
    }

    @Override // android.view.View
    public void onSizeChanged(int i10, int i11, int i12, int i13) {
        super.onSizeChanged(i10, i11, i12, i13);
        this.fm = i10;
        this.ro = i11;
        RectF rectF = this.f6434lb;
        int i14 = this.wu;
        rectF.set(i14, i14, i10 - i14, i11 - i14);
    }

    public void setBgColor(int i10) {
        this.jnr.setStyle(Paint.Style.FILL);
        this.jnr.setColor(i10);
    }

    public void setDislikeColor(int i10) {
        this.wsy.setColor(i10);
    }

    public void setDislikeWidth(int i10) {
        this.wsy.setStrokeWidth(i10);
    }

    public void setRadius(int i10) {
        this.ajl = i10;
    }

    public void setStrokeColor(int i10) {
        this.yz.setStyle(Paint.Style.STROKE);
        this.yz.setColor(i10);
    }

    public void setStrokeWidth(int i10) {
        this.yz.setStrokeWidth(i10);
        this.wu = i10;
    }
}
