package defpackage;

import android.annotation.SuppressLint;
import android.graphics.Canvas;
import android.graphics.Outline;
import android.graphics.Typeface;
import android.view.View;
import android.view.ViewOutlineProvider;

/* JADX INFO: loaded from: classes.dex */
public class ja6 extends View implements m33 {
    public int a;
    public boolean b;
    public float c;
    public float d;
    public float e;
    public float f;
    public String i;
    public int j;
    public int k;
    public int l;
    public float m;
    public float n;
    public float o;
    public float p;
    public float q;
    public float r;
    public float s;
    public float t;
    public float u;

    public class a extends ViewOutlineProvider {
        @Override // android.view.ViewOutlineProvider
        public final void getOutline(View view, Outline outline) {
            throw null;
        }
    }

    public class b extends ViewOutlineProvider {
        @Override // android.view.ViewOutlineProvider
        public final void getOutline(View view, Outline outline) {
            throw null;
        }
    }

    private float getHorizontalOffset() {
        Float.isNaN(this.f);
        this.i.length();
        throw null;
    }

    private float getVerticalOffset() {
        Float.isNaN(this.f);
        throw null;
    }

    @Override // defpackage.m33
    public final void a(float f, float f2, float f3, float f4) {
        int i = (int) (f + 0.5f);
        this.m = f - i;
        int i2 = (int) (f3 + 0.5f);
        int i3 = i2 - i;
        int i4 = (int) (f4 + 0.5f);
        int i5 = (int) (f2 + 0.5f);
        int i6 = i4 - i5;
        if (getMeasuredHeight() == i6 && getMeasuredWidth() == i3) {
            super.layout(i, i5, i2, i4);
        } else {
            measure(View.MeasureSpec.makeMeasureSpec(i3, 1073741824), View.MeasureSpec.makeMeasureSpec(i6, 1073741824));
            super.layout(i, i5, i2, i4);
        }
    }

    public final void b() {
        Float.isNaN(this.r);
        Float.isNaN(this.s);
        Float.isNaN(this.t);
        Float.isNaN(this.u);
        throw null;
    }

    public float getRound() {
        return this.d;
    }

    public float getRoundPercent() {
        return this.c;
    }

    public float getScaleFromTextSize() {
        return this.f;
    }

    public float getTextBackgroundPanX() {
        return this.r;
    }

    public float getTextBackgroundPanY() {
        return this.s;
    }

    public float getTextBackgroundRotate() {
        return this.u;
    }

    public float getTextBackgroundZoom() {
        return this.t;
    }

    public int getTextOutlineColor() {
        return this.a;
    }

    public float getTextPanX() {
        return this.p;
    }

    public float getTextPanY() {
        return this.q;
    }

    public float getTextureHeight() {
        return this.n;
    }

    public float getTextureWidth() {
        return this.o;
    }

    public Typeface getTypeface() {
        throw null;
    }

    @Override // android.view.View
    public final void layout(int i, int i2, int i3, int i4) {
        super.layout(i, i2, i3, i4);
        boolean zIsNaN = Float.isNaN(this.f);
        float f = zIsNaN ? 1.0f : this.e / this.f;
        boolean z = this.b;
        if (z || !zIsNaN) {
            if (z || f != 1.0f) {
                throw null;
            }
        }
    }

    @Override // android.view.View
    public final void onDraw(Canvas canvas) {
        float f = Float.isNaN(this.f) ? 1.0f : this.e / this.f;
        super.onDraw(canvas);
        boolean z = this.b;
        if (!z && f == 1.0f) {
            canvas.drawText(this.i, this.m + this.j + getHorizontalOffset(), this.k + getVerticalOffset(), null);
        } else {
            if (z) {
                throw null;
            }
            getHorizontalOffset();
            getVerticalOffset();
            throw null;
        }
    }

    @Override // android.view.View
    public final void onMeasure(int i, int i2) {
        int mode = View.MeasureSpec.getMode(i);
        int mode2 = View.MeasureSpec.getMode(i2);
        int size = View.MeasureSpec.getSize(i);
        int size2 = View.MeasureSpec.getSize(i2);
        this.j = getPaddingLeft();
        getPaddingRight();
        this.k = getPaddingTop();
        getPaddingBottom();
        if (mode == 1073741824 && mode2 == 1073741824) {
            setMeasuredDimension(size, size2);
        } else {
            this.i.getClass();
            throw null;
        }
    }

    @SuppressLint({"RtlHardcoded"})
    public void setGravity(int i) {
        if ((i & 8388615) == 0) {
            i |= 8388611;
        }
        if ((i & 112) == 0) {
            i |= 48;
        }
        if (i != this.l) {
            invalidate();
        }
        this.l = i;
        int i2 = i & 112;
        if (i2 == 48) {
            this.q = -1.0f;
        } else if (i2 != 80) {
            this.q = 0.0f;
        } else {
            this.q = 1.0f;
        }
        int i3 = i & 8388615;
        if (i3 != 3) {
            if (i3 != 5) {
                if (i3 != 8388611) {
                    if (i3 != 8388613) {
                        this.p = 0.0f;
                        return;
                    }
                }
            }
            this.p = 1.0f;
            return;
        }
        this.p = -1.0f;
    }

    @l18
    public void setRound(float f) {
        if (Float.isNaN(f)) {
            this.d = f;
            float f2 = this.c;
            this.c = -1.0f;
            setRoundPercent(f2);
            return;
        }
        boolean z = this.d != f;
        this.d = f;
        if (f != 0.0f) {
            setClipToOutline(true);
            getWidth();
            getHeight();
            throw null;
        }
        setClipToOutline(false);
        if (z) {
            invalidateOutline();
        }
    }

    @l18
    public void setRoundPercent(float f) {
        boolean z = this.c != f;
        this.c = f;
        if (f != 0.0f) {
            setClipToOutline(true);
            Math.min(getWidth(), getHeight());
            throw null;
        }
        setClipToOutline(false);
        if (z) {
            invalidateOutline();
        }
    }

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

    public void setText(CharSequence charSequence) {
        this.i = charSequence.toString();
        invalidate();
    }

    public void setTextBackgroundPanX(float f) {
        this.r = f;
        b();
        throw null;
    }

    public void setTextBackgroundPanY(float f) {
        this.s = f;
        b();
        throw null;
    }

    public void setTextBackgroundRotate(float f) {
        this.u = f;
        b();
        throw null;
    }

    public void setTextBackgroundZoom(float f) {
        this.t = f;
        b();
        throw null;
    }

    public void setTextFillColor(int i) {
        invalidate();
    }

    public void setTextOutlineColor(int i) {
        this.a = i;
        this.b = true;
        invalidate();
    }

    public void setTextOutlineThickness(float f) {
        this.b = true;
        if (Float.isNaN(f)) {
            this.b = false;
        }
        invalidate();
    }

    public void setTextPanX(float f) {
        this.p = f;
        invalidate();
    }

    public void setTextPanY(float f) {
        this.q = f;
        invalidate();
    }

    public void setTextSize(float f) {
        this.e = f;
        cw1.a();
        Float.isNaN(this.f);
        throw null;
    }

    public void setTextureHeight(float f) {
        this.n = f;
        b();
        throw null;
    }

    public void setTextureWidth(float f) {
        this.o = f;
        b();
        throw null;
    }

    public void setTypeface(Typeface typeface) {
        throw null;
    }
}
