package o;

import android.graphics.Matrix;
import android.graphics.Path;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* loaded from: classes.dex */
public final /* synthetic */ class PH implements OC {
    public final /* synthetic */ int l;
    public final /* synthetic */ int m;
    public final /* synthetic */ Object n;

    /* renamed from: o, reason: collision with root package name */
    public final /* synthetic */ int f282o;

    public /* synthetic */ PH(int i, VW vw, int i2) {
        this.l = 1;
        this.m = i;
        this.n = vw;
        this.f282o = i2;
    }

    @Override // o.OC
    public final Object g(Object obj) {
        switch (this.l) {
            case 0:
                UW.g((UW) obj, (VW) this.n, this.m, this.f282o);
                break;
            case 1:
                UW.g((UW) obj, (VW) this.n, C2887xC.D((this.m - r0.l) / 2.0f), C2887xC.D((this.f282o - r0.m) / 2.0f));
                break;
            case 2:
                UW.g((UW) obj, (VW) this.n, this.m, this.f282o);
                break;
            default:
                O4 o4 = (O4) this.n;
                BV bv = (BV) obj;
                J4 j4 = bv.a;
                int iD = bv.d(this.m);
                int iD2 = bv.d(this.f282o);
                CharSequence charSequence = j4.e;
                if (iD < 0 || iD > iD2 || iD2 > charSequence.length()) {
                    AbstractC2228qH.a("start(" + iD + ") or end(" + iD2 + ") is out of range [0.." + charSequence.length() + "], or start > end!");
                }
                Path path = new Path();
                Le0 le0 = j4.d;
                le0.f.getSelectionPath(iD, iD2, path);
                int i = le0.h;
                if (i != 0 && !path.isEmpty()) {
                    path.offset(0.0f, i);
                }
                float f = bv.f;
                long jFloatToRawIntBits = (Float.floatToRawIntBits(0.0f) << 32) | (Float.floatToRawIntBits(f) & 4294967295L);
                Matrix matrix = new Matrix();
                matrix.setTranslate(Float.intBitsToFloat((int) (jFloatToRawIntBits >> 32)), Float.intBitsToFloat((int) (jFloatToRawIntBits & 4294967295L)));
                path.transform(matrix);
                Path path2 = o4.a;
                int i2 = (int) 0;
                path2.addPath(path, Float.intBitsToFloat(i2), Float.intBitsToFloat(i2));
                break;
        }
        return Oh0.a;
    }

    public /* synthetic */ PH(Object obj, int i, int i2, int i3) {
        this.l = i3;
        this.n = obj;
        this.m = i;
        this.f282o = i2;
    }
}
