package xyz.stream.view.refresh.drawable.path;

import android.annotation.SuppressLint;
import android.graphics.Matrix;
import android.graphics.Path;
import com.google.android.gms.measurement.internal.u1;
import defpackage.e;
import java.util.ArrayList;
import java.util.List;

/* JADX INFO: loaded from: classes3.dex */
public class PathParser {

    public static class ExtractFloatResult {

        /* JADX INFO: renamed from: a, reason: collision with root package name */
        public boolean f36554a;
    }

    public static class PathDataNode {

        /* JADX INFO: renamed from: a, reason: collision with root package name */
        public char f36555a;

        /* JADX INFO: renamed from: b, reason: collision with root package name */
        public float[] f36556b;

        public static void a(Path path, float f10, float f11, float f12, float f13, float f14, float f15, float f16, boolean z10, boolean z11) {
            double d10;
            double d11;
            double radians = Math.toRadians(f16);
            double dCos = Math.cos(radians);
            double dSin = Math.sin(radians);
            double d12 = f10;
            double d13 = f11;
            double d14 = (d13 * dSin) + (d12 * dCos);
            double d15 = d12;
            double d16 = f14;
            double d17 = d14 / d16;
            double d18 = f15;
            double d19 = ((d13 * dCos) + (((double) (-f10)) * dSin)) / d18;
            double d20 = d13;
            double d21 = f13;
            double d22 = ((d21 * dSin) + (((double) f12) * dCos)) / d16;
            double d23 = ((d21 * dCos) + (((double) (-f12)) * dSin)) / d18;
            double d24 = d17 - d22;
            double d25 = d19 - d23;
            double d26 = (d17 + d22) / 2.0d;
            double d27 = (d19 + d23) / 2.0d;
            double d28 = (d25 * d25) + (d24 * d24);
            if (d28 == 0.0d) {
                return;
            }
            double d29 = (1.0d / d28) - 0.25d;
            if (d29 < 0.0d) {
                float fSqrt = (float) (Math.sqrt(d28) / 1.99999d);
                a(path, f10, f11, f12, f13, f14 * fSqrt, f15 * fSqrt, f16, z10, z11);
                return;
            }
            double dSqrt = Math.sqrt(d29);
            double d30 = d24 * dSqrt;
            double d31 = dSqrt * d25;
            if (z10 == z11) {
                d10 = d26 - d31;
                d11 = d27 + d30;
            } else {
                d10 = d26 + d31;
                d11 = d27 - d30;
            }
            double dAtan2 = Math.atan2(d19 - d11, d17 - d10);
            double dAtan22 = Math.atan2(d23 - d11, d22 - d10) - dAtan2;
            if (z11 != (dAtan22 >= 0.0d)) {
                dAtan22 = dAtan22 > 0.0d ? dAtan22 - 6.283185307179586d : dAtan22 + 6.283185307179586d;
            }
            double d32 = d10 * d16;
            double d33 = d11 * d18;
            double d34 = (d32 * dCos) - (d33 * dSin);
            double d35 = (d33 * dCos) + (d32 * dSin);
            int iCeil = (int) Math.ceil(Math.abs((dAtan22 * 4.0d) / 3.141592653589793d));
            double dCos2 = Math.cos(radians);
            double dSin2 = Math.sin(radians);
            double dCos3 = Math.cos(dAtan2);
            double dSin3 = Math.sin(dAtan2);
            double d36 = -d16;
            double d37 = d36 * dCos2;
            double d38 = d18 * dSin2;
            double d39 = (d37 * dSin3) - (d38 * dCos3);
            double d40 = d36 * dSin2;
            double d41 = d18 * dCos2;
            double d42 = (dCos3 * d41) + (dSin3 * d40);
            double d43 = d41;
            double d44 = dAtan22 / ((double) iCeil);
            int i10 = 0;
            while (i10 < iCeil) {
                double d45 = dAtan2 + d44;
                double dSin4 = Math.sin(d45);
                double dCos4 = Math.cos(d45);
                double d46 = d44;
                double d47 = (((d16 * dCos2) * dCos4) + d34) - (d38 * dSin4);
                double d48 = d43;
                double d49 = d34;
                double d50 = (d48 * dSin4) + (d16 * dSin2 * dCos4) + d35;
                double d51 = (d37 * dSin4) - (d38 * dCos4);
                double d52 = (dCos4 * d48) + (dSin4 * d40);
                double d53 = d45 - dAtan2;
                double dTan = Math.tan(d53 / 2.0d);
                double dSqrt2 = ((Math.sqrt(((dTan * 3.0d) * dTan) + 4.0d) - 1.0d) * Math.sin(d53)) / 3.0d;
                path.rLineTo(0.0f, 0.0f);
                path.cubicTo((float) ((d39 * dSqrt2) + d15), (float) ((d42 * dSqrt2) + d20), (float) (d47 - (dSqrt2 * d51)), (float) (d50 - (dSqrt2 * d52)), (float) d47, (float) d50);
                i10++;
                dAtan2 = d45;
                d40 = d40;
                dCos2 = dCos2;
                iCeil = iCeil;
                d42 = d52;
                d16 = d16;
                d39 = d51;
                d15 = d47;
                d20 = d50;
                d34 = d49;
                d44 = d46;
                d43 = d48;
            }
        }

        public static void nodesToPath(PathDataNode[] pathDataNodeArr, Path path) {
            int i10;
            int i11;
            char c6;
            int i12;
            int i13;
            PathDataNode pathDataNode;
            float f10;
            float f11;
            float f12;
            float f13;
            float f14;
            float f15;
            float f16;
            float f17;
            float f18;
            float f19;
            float f20;
            float f21;
            PathDataNode[] pathDataNodeArr2 = pathDataNodeArr;
            int i14 = 6;
            float[] fArr = new float[6];
            int length = pathDataNodeArr2.length;
            int i15 = 0;
            char c10 = 'm';
            while (i15 < length) {
                PathDataNode pathDataNode2 = pathDataNodeArr2[i15];
                char c11 = pathDataNode2.f36555a;
                float f22 = fArr[0];
                float f23 = fArr[1];
                float f24 = fArr[2];
                float f25 = fArr[3];
                float f26 = fArr[4];
                float f27 = fArr[5];
                switch (c11) {
                    case 'A':
                    case 'a':
                        i10 = 7;
                        break;
                    case 'C':
                    case 'c':
                        i10 = i14;
                        break;
                    case 'H':
                    case 'V':
                    case 'h':
                    case 'v':
                        i10 = 1;
                        break;
                    case 'Q':
                    case 'S':
                    case 'q':
                    case 's':
                        i10 = 4;
                        break;
                    case 'Z':
                    case 'z':
                        path.close();
                        path.moveTo(f26, f27);
                        f22 = f26;
                        f24 = f22;
                        f23 = f27;
                        f25 = f23;
                    default:
                        i10 = 2;
                        break;
                }
                float f28 = f26;
                float f29 = f27;
                float f30 = f22;
                float f31 = f23;
                int i16 = 0;
                while (true) {
                    float[] fArr2 = pathDataNode2.f36556b;
                    if (i16 < fArr2.length) {
                        if (c11 != 'A') {
                            if (c11 != 'C') {
                                if (c11 == 'H') {
                                    i11 = i16;
                                    c6 = c11;
                                    i12 = i15;
                                    i13 = length;
                                    pathDataNode = pathDataNode2;
                                    path.lineTo(fArr2[i11], f31);
                                    f30 = fArr2[i11];
                                } else if (c11 == 'Q') {
                                    i11 = i16;
                                    c6 = c11;
                                    i12 = i15;
                                    i13 = length;
                                    pathDataNode = pathDataNode2;
                                    float f32 = fArr2[i11];
                                    int i17 = i11 + 1;
                                    float f33 = fArr2[i17];
                                    int i18 = i11 + 2;
                                    int i19 = i11 + 3;
                                    path.quadTo(f32, f33, fArr2[i18], fArr2[i19]);
                                    f10 = fArr2[i11];
                                    f11 = fArr2[i17];
                                    f30 = fArr2[i18];
                                    f31 = fArr2[i19];
                                } else if (c11 == 'V') {
                                    i11 = i16;
                                    c6 = c11;
                                    i12 = i15;
                                    i13 = length;
                                    pathDataNode = pathDataNode2;
                                    path.lineTo(f30, fArr2[i11]);
                                    f31 = fArr2[i11];
                                } else if (c11 != 'a') {
                                    if (c11 != 'c') {
                                        if (c11 != 'h') {
                                            if (c11 == 'q') {
                                                i11 = i16;
                                                float f34 = f31;
                                                float f35 = f30;
                                                int i20 = i11 + 1;
                                                int i21 = i11 + 2;
                                                int i22 = i11 + 3;
                                                path.rQuadTo(fArr2[i11], fArr2[i20], fArr2[i21], fArr2[i22]);
                                                float f36 = f35 + fArr2[i11];
                                                float f37 = fArr2[i20] + f34;
                                                float f38 = f35 + fArr2[i21];
                                                f31 = f34 + fArr2[i22];
                                                f25 = f37;
                                                f24 = f36;
                                                c6 = c11;
                                                i12 = i15;
                                                i13 = length;
                                                f30 = f38;
                                            } else if (c11 == 'v') {
                                                i11 = i16;
                                                path.rLineTo(0.0f, fArr2[i11]);
                                                f31 += fArr2[i11];
                                            } else if (c11 == 'L') {
                                                i11 = i16;
                                                int i23 = i11 + 1;
                                                path.lineTo(fArr2[i11], fArr2[i23]);
                                                f30 = fArr2[i11];
                                                f31 = fArr2[i23];
                                            } else if (c11 == 'M') {
                                                i11 = i16;
                                                f30 = fArr2[i11];
                                                f31 = fArr2[i11 + 1];
                                                if (i11 > 0) {
                                                    path.lineTo(f30, f31);
                                                } else {
                                                    path.moveTo(f30, f31);
                                                    f29 = f31;
                                                    f28 = f30;
                                                }
                                            } else if (c11 == 'S') {
                                                i11 = i16;
                                                float f39 = f31;
                                                float f40 = f30;
                                                if (c10 == 'c' || c10 == 's' || c10 == 'C' || c10 == 'S') {
                                                    f16 = (f39 * 2.0f) - f25;
                                                    f17 = (f40 * 2.0f) - f24;
                                                } else {
                                                    f17 = f40;
                                                    f16 = f39;
                                                }
                                                int i24 = i11 + 1;
                                                int i25 = i11 + 2;
                                                int i26 = i11 + 3;
                                                path.cubicTo(f17, f16, fArr2[i11], fArr2[i24], fArr2[i25], fArr2[i26]);
                                                float f41 = fArr2[i11];
                                                float f42 = fArr2[i24];
                                                f30 = fArr2[i25];
                                                f31 = fArr2[i26];
                                                f25 = f42;
                                                f24 = f41;
                                            } else if (c11 == 'T') {
                                                i11 = i16;
                                                float f43 = f31;
                                                float f44 = f30;
                                                if (c10 == 'q' || c10 == 't' || c10 == 'Q' || c10 == 'T') {
                                                    f12 = (f44 * 2.0f) - f24;
                                                    f13 = (f43 * 2.0f) - f25;
                                                } else {
                                                    f12 = f44;
                                                    f13 = f43;
                                                }
                                                int i27 = i11 + 1;
                                                path.quadTo(f12, f13, fArr2[i11], fArr2[i27]);
                                                f14 = fArr2[i11];
                                                f15 = fArr2[i27];
                                            } else if (c11 == 'l') {
                                                i11 = i16;
                                                int i28 = i11 + 1;
                                                path.rLineTo(fArr2[i11], fArr2[i28]);
                                                f30 += fArr2[i11];
                                                f31 += fArr2[i28];
                                            } else if (c11 == 'm') {
                                                i11 = i16;
                                                float f45 = fArr2[i11];
                                                f30 += f45;
                                                float f46 = fArr2[i11 + 1];
                                                f31 += f46;
                                                if (i11 > 0) {
                                                    path.rLineTo(f45, f46);
                                                } else {
                                                    path.rMoveTo(f45, f46);
                                                    f29 = f31;
                                                    f28 = f30;
                                                }
                                            } else if (c11 == 's') {
                                                if (c10 == 'c' || c10 == 's' || c10 == 'C' || c10 == 'S') {
                                                    float f47 = f30 - f24;
                                                    f18 = f31 - f25;
                                                    f19 = f47;
                                                } else {
                                                    f18 = 0.0f;
                                                    f19 = 0.0f;
                                                }
                                                int i29 = i16 + 1;
                                                int i30 = i16 + 2;
                                                int i31 = i16 + 3;
                                                i11 = i16;
                                                float f48 = f31;
                                                float f49 = f30;
                                                path.rCubicTo(f19, f18, fArr2[i16], fArr2[i29], fArr2[i30], fArr2[i31]);
                                                f12 = f49 + fArr2[i11];
                                                f13 = f48 + fArr2[i29];
                                                f14 = f49 + fArr2[i30];
                                                f15 = fArr2[i31] + f48;
                                            } else if (c11 != 't') {
                                                i11 = i16;
                                            } else {
                                                if (c10 == 'q' || c10 == 't' || c10 == 'Q' || c10 == 'T') {
                                                    f20 = f30 - f24;
                                                    f21 = f31 - f25;
                                                } else {
                                                    f21 = 0.0f;
                                                    f20 = 0.0f;
                                                }
                                                int i32 = i16 + 1;
                                                path.rQuadTo(f20, f21, fArr2[i16], fArr2[i32]);
                                                float f50 = f20 + f30;
                                                float f51 = f21 + f31;
                                                f30 += fArr2[i16];
                                                f31 += fArr2[i32];
                                                f25 = f51;
                                                i11 = i16;
                                                c6 = c11;
                                                i12 = i15;
                                                i13 = length;
                                                f24 = f50;
                                            }
                                            pathDataNode = pathDataNode2;
                                        } else {
                                            i11 = i16;
                                            path.rLineTo(fArr2[i11], 0.0f);
                                            f30 += fArr2[i11];
                                        }
                                        c6 = c11;
                                        i12 = i15;
                                        i13 = length;
                                        pathDataNode = pathDataNode2;
                                    } else {
                                        i11 = i16;
                                        float f52 = f31;
                                        float f53 = f30;
                                        int i33 = i11 + 2;
                                        int i34 = i11 + 3;
                                        int i35 = i11 + 4;
                                        int i36 = i11 + 5;
                                        path.rCubicTo(fArr2[i11], fArr2[i11 + 1], fArr2[i33], fArr2[i34], fArr2[i35], fArr2[i36]);
                                        f12 = f53 + fArr2[i33];
                                        f13 = f52 + fArr2[i34];
                                        f14 = f53 + fArr2[i35];
                                        f15 = fArr2[i36] + f52;
                                    }
                                    f25 = f13;
                                    f24 = f12;
                                    c6 = c11;
                                    i12 = i15;
                                    i13 = length;
                                    f30 = f14;
                                    f31 = f15;
                                    pathDataNode = pathDataNode2;
                                } else {
                                    i11 = i16;
                                    float f54 = f31;
                                    float f55 = f30;
                                    int i37 = i11 + 5;
                                    int i38 = i11 + 6;
                                    c6 = c11;
                                    i13 = length;
                                    pathDataNode = pathDataNode2;
                                    i12 = i15;
                                    a(path, f55, f54, fArr2[i37] + f55, fArr2[i38] + f54, fArr2[i11], fArr2[i11 + 1], fArr2[i11 + 2], fArr2[i11 + 3] != 0.0f, fArr2[i11 + 4] != 0.0f);
                                    f30 = f55 + fArr2[i37];
                                    f31 = f54 + fArr2[i38];
                                }
                                i16 = i11 + i10;
                                pathDataNode2 = pathDataNode;
                                length = i13;
                                c10 = c6;
                                c11 = c10;
                                i15 = i12;
                            } else {
                                i11 = i16;
                                c6 = c11;
                                i12 = i15;
                                i13 = length;
                                pathDataNode = pathDataNode2;
                                int i39 = i11 + 2;
                                int i40 = i11 + 3;
                                int i41 = i11 + 4;
                                int i42 = i11 + 5;
                                path.cubicTo(fArr2[i11], fArr2[i11 + 1], fArr2[i39], fArr2[i40], fArr2[i41], fArr2[i42]);
                                f30 = fArr2[i41];
                                f31 = fArr2[i42];
                                f10 = fArr2[i39];
                                f11 = fArr2[i40];
                            }
                            f24 = f10;
                            f25 = f11;
                            i16 = i11 + i10;
                            pathDataNode2 = pathDataNode;
                            length = i13;
                            c10 = c6;
                            c11 = c10;
                            i15 = i12;
                        } else {
                            i11 = i16;
                            c6 = c11;
                            i12 = i15;
                            i13 = length;
                            pathDataNode = pathDataNode2;
                            int i43 = i11 + 5;
                            int i44 = i11 + 6;
                            a(path, f30, f31, fArr2[i43], fArr2[i44], fArr2[i11], fArr2[i11 + 1], fArr2[i11 + 2], fArr2[i11 + 3] != 0.0f, fArr2[i11 + 4] != 0.0f);
                            f30 = fArr2[i43];
                            f31 = fArr2[i44];
                        }
                        f25 = f31;
                        f24 = f30;
                        i16 = i11 + i10;
                        pathDataNode2 = pathDataNode;
                        length = i13;
                        c10 = c6;
                        c11 = c10;
                        i15 = i12;
                    }
                }
                fArr[0] = f30;
                fArr[1] = f31;
                fArr[2] = f24;
                fArr[3] = f25;
                fArr[4] = f28;
                fArr[5] = f29;
                i15++;
                c10 = pathDataNode2.f36555a;
                pathDataNodeArr2 = pathDataNodeArr;
                length = length;
                i14 = 6;
            }
        }
    }

    /* JADX WARN: Multi-variable type inference failed */
    /* JADX WARN: Removed duplicated region for block: B:21:0x0046  */
    /* JADX WARN: Removed duplicated region for block: B:51:0x00a8 A[FALL_THROUGH] */
    /* JADX WARN: Removed duplicated region for block: B:55:0x00b0 A[Catch: NumberFormatException -> 0x00c3, LOOP:3: B:35:0x007e->B:55:0x00b0, LOOP_END, TryCatch #0 {NumberFormatException -> 0x00c3, blocks: (B:32:0x0063, B:34:0x0076, B:35:0x007e, B:37:0x0084, B:41:0x0090, B:55:0x00b0, B:45:0x009a, B:50:0x00a6, B:57:0x00b5, B:60:0x00c5, B:64:0x00cc, B:65:0x00cf), top: B:77:0x0063 }] */
    /* JADX WARN: Removed duplicated region for block: B:57:0x00b5 A[Catch: NumberFormatException -> 0x00c3, TryCatch #0 {NumberFormatException -> 0x00c3, blocks: (B:32:0x0063, B:34:0x0076, B:35:0x007e, B:37:0x0084, B:41:0x0090, B:55:0x00b0, B:45:0x009a, B:50:0x00a6, B:57:0x00b5, B:60:0x00c5, B:64:0x00cc, B:65:0x00cf), top: B:77:0x0063 }] */
    /* JADX WARN: Removed duplicated region for block: B:62:0x00c9  */
    /* JADX WARN: Removed duplicated region for block: B:64:0x00cc A[Catch: NumberFormatException -> 0x00c3, TryCatch #0 {NumberFormatException -> 0x00c3, blocks: (B:32:0x0063, B:34:0x0076, B:35:0x007e, B:37:0x0084, B:41:0x0090, B:55:0x00b0, B:45:0x009a, B:50:0x00a6, B:57:0x00b5, B:60:0x00c5, B:64:0x00cc, B:65:0x00cf), top: B:77:0x0063 }] */
    /* JADX WARN: Removed duplicated region for block: B:80:0x00f8 A[SYNTHETIC] */
    /* JADX WARN: Removed duplicated region for block: B:91:0x00af A[SYNTHETIC] */
    /*
        Code decompiled incorrectly, please refer to instructions dump.
    */
    public static PathDataNode[] createNodesFromPathData(String str) {
        String strTrim;
        float[] fArr;
        int i10;
        boolean z10;
        boolean z11;
        boolean z12;
        boolean z13;
        if (str == null) {
            return null;
        }
        ArrayList arrayList = new ArrayList();
        int i11 = 0;
        int i12 = 0;
        int i13 = 1;
        while (i13 < str.length()) {
            while (i13 < str.length()) {
                char cCharAt = str.charAt(i13);
                if ((cCharAt - 'Z') * (cCharAt - 'A') > 0) {
                    if ((cCharAt - 'z') * (cCharAt - 'a') > 0) {
                        continue;
                    }
                    i13++;
                }
                if (cCharAt == 'e' || cCharAt == 'E') {
                    i13++;
                } else {
                    strTrim = str.substring(i12, i13).trim();
                    if (strTrim.length() > 0) {
                        if (((strTrim.charAt(i11) == 'z' ? 1 : i11) | (strTrim.charAt(i11) == 'Z' ? 1 : i11)) != 0) {
                            fArr = new float[i11];
                            i10 = i11;
                        } else {
                            try {
                                int length = strTrim.length();
                                float[] fArr2 = new float[length];
                                ExtractFloatResult extractFloatResult = new ExtractFloatResult();
                                int length2 = strTrim.length();
                                int i14 = i11;
                                int i15 = 1;
                                boolean z14 = i11;
                                while (i15 < length2) {
                                    extractFloatResult.f36554a = z14;
                                    boolean z15 = z14;
                                    boolean z16 = z15 ? 1 : 0;
                                    boolean z17 = z16 ? 1 : 0;
                                    int i16 = i15;
                                    boolean z18 = z15;
                                    boolean z19 = z16;
                                    while (i16 < strTrim.length()) {
                                        char cCharAt2 = strTrim.charAt(i16);
                                        if (cCharAt2 == ' ') {
                                            z10 = false;
                                            z11 = true;
                                            z12 = z19;
                                            if (z11) {
                                                i16++;
                                                z18 = z10;
                                                z19 = z12;
                                                z17 = z11;
                                            }
                                        } else {
                                            if (cCharAt2 != 'E' && cCharAt2 != 'e') {
                                                switch (cCharAt2) {
                                                    case '-':
                                                        z13 = z17;
                                                        z13 = z17;
                                                        if (i16 != i15 && !z18) {
                                                            extractFloatResult.f36554a = true;
                                                            break;
                                                        }
                                                        z10 = false;
                                                        z12 = z19;
                                                        z11 = z13;
                                                    case ',':
                                                        break;
                                                    case '.':
                                                        if (!z19) {
                                                            z10 = false;
                                                            z12 = true;
                                                            z11 = z17;
                                                        } else {
                                                            extractFloatResult.f36554a = true;
                                                            z13 = true;
                                                            z10 = false;
                                                            z12 = z19;
                                                            z11 = z13;
                                                        }
                                                        break;
                                                    default:
                                                        z13 = z17;
                                                        z10 = false;
                                                        z12 = z19;
                                                        z11 = z13;
                                                        break;
                                                }
                                            } else {
                                                z10 = true;
                                                z12 = z19;
                                                z11 = z17;
                                            }
                                            if (z11) {
                                            }
                                        }
                                        if (i15 < i16) {
                                            fArr2[i14] = Float.parseFloat(strTrim.substring(i15, i16));
                                            i14++;
                                        }
                                        i15 = !extractFloatResult.f36554a ? i16 : i16 + 1;
                                        z14 = 0;
                                        i14 = i14;
                                    }
                                    if (i15 < i16) {
                                    }
                                    if (!extractFloatResult.f36554a) {
                                    }
                                    z14 = 0;
                                    i14 = i14;
                                }
                                int iMin = Math.min(i14, length);
                                fArr = new float[i14];
                                i10 = 0;
                                System.arraycopy(fArr2, 0, fArr, 0, iMin);
                            } catch (NumberFormatException e10) {
                                throw new RuntimeException(u1.k("error in parsing \"", strTrim, "\""), e10);
                            }
                        }
                        char cCharAt3 = strTrim.charAt(i10);
                        PathDataNode pathDataNode = new PathDataNode();
                        pathDataNode.f36555a = cCharAt3;
                        pathDataNode.f36556b = fArr;
                        arrayList.add(pathDataNode);
                    }
                    i12 = i13;
                    i11 = 0;
                    i13++;
                }
            }
            strTrim = str.substring(i12, i13).trim();
            if (strTrim.length() > 0) {
            }
            i12 = i13;
            i11 = 0;
            i13++;
        }
        if (i13 - i12 == 1 && i12 < str.length()) {
            char cCharAt4 = str.charAt(i12);
            PathDataNode pathDataNode2 = new PathDataNode();
            pathDataNode2.f36555a = cCharAt4;
            pathDataNode2.f36556b = new float[0];
            arrayList.add(pathDataNode2);
        }
        return (PathDataNode[]) arrayList.toArray(new PathDataNode[0]);
    }

    public static Path createPathFromPathData(String str) {
        Path path = new Path();
        PathDataNode[] pathDataNodeArrCreateNodesFromPathData = createNodesFromPathData(str);
        if (pathDataNodeArrCreateNodesFromPathData == null) {
            return null;
        }
        try {
            PathDataNode.nodesToPath(pathDataNodeArrCreateNodesFromPathData, path);
            return path;
        } catch (RuntimeException e10) {
            throw new RuntimeException(e.i("Error in parsing ", str), e10);
        }
    }

    @SuppressLint({"ObsoleteSdkInt"})
    public static List<Path> transformScale(float f10, float f11, List<Path> list, List<String> list2) {
        Matrix matrix = new Matrix();
        matrix.setScale(f10, f11);
        ArrayList arrayList = new ArrayList();
        for (Path path : list) {
            Path path2 = new Path();
            path.transform(matrix, path2);
            arrayList.add(path2);
        }
        return arrayList;
    }
}
