package o;

import android.graphics.Matrix;
import android.graphics.Paint;
import java.util.ArrayList;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* loaded from: classes.dex */
public final class Qi0 extends Ri0 {
    public final Matrix a;
    public final ArrayList b;
    public float c;
    public float d;
    public float e;
    public float f;
    public float g;
    public float h;
    public float i;
    public final Matrix j;
    public String k;

    public Qi0() {
        this.a = new Matrix();
        this.b = new ArrayList();
        this.c = 0.0f;
        this.d = 0.0f;
        this.e = 0.0f;
        this.f = 1.0f;
        this.g = 1.0f;
        this.h = 0.0f;
        this.i = 0.0f;
        this.j = new Matrix();
        this.k = null;
    }

    @Override // o.Ri0
    public final boolean a() {
        int i = 0;
        while (true) {
            ArrayList arrayList = this.b;
            if (i >= arrayList.size()) {
                return false;
            }
            if (((Ri0) arrayList.get(i)).a()) {
                return true;
            }
            i++;
        }
    }

    @Override // o.Ri0
    public final boolean b(int[] iArr) {
        int i = 0;
        boolean zB = false;
        while (true) {
            ArrayList arrayList = this.b;
            if (i >= arrayList.size()) {
                return zB;
            }
            zB |= ((Ri0) arrayList.get(i)).b(iArr);
            i++;
        }
    }

    public final void c() {
        Matrix matrix = this.j;
        matrix.reset();
        matrix.postTranslate(-this.d, -this.e);
        matrix.postScale(this.f, this.g);
        matrix.postRotate(this.c, 0.0f, 0.0f);
        matrix.postTranslate(this.h + this.d, this.i + this.e);
    }

    public String getGroupName() {
        return this.k;
    }

    public Matrix getLocalMatrix() {
        return this.j;
    }

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

    public float getPivotY() {
        return this.e;
    }

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

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

    public float getScaleY() {
        return this.g;
    }

    public float getTranslateX() {
        return this.h;
    }

    public float getTranslateY() {
        return this.i;
    }

    public void setPivotX(float f) {
        if (f != this.d) {
            this.d = f;
            c();
        }
    }

    public void setPivotY(float f) {
        if (f != this.e) {
            this.e = f;
            c();
        }
    }

    public void setRotation(float f) {
        if (f != this.c) {
            this.c = f;
            c();
        }
    }

    public void setScaleX(float f) {
        if (f != this.f) {
            this.f = f;
            c();
        }
    }

    public void setScaleY(float f) {
        if (f != this.g) {
            this.g = f;
            c();
        }
    }

    public void setTranslateX(float f) {
        if (f != this.h) {
            this.h = f;
            c();
        }
    }

    public void setTranslateY(float f) {
        if (f != this.i) {
            this.i = f;
            c();
        }
    }

    /* JADX WARN: Multi-variable type inference failed */
    public Qi0(Qi0 qi0, C1839m9 c1839m9) {
        Oi0 oi0;
        this.a = new Matrix();
        this.b = new ArrayList();
        this.c = 0.0f;
        this.d = 0.0f;
        this.e = 0.0f;
        this.f = 1.0f;
        this.g = 1.0f;
        this.h = 0.0f;
        this.i = 0.0f;
        Matrix matrix = new Matrix();
        this.j = matrix;
        this.k = null;
        this.c = qi0.c;
        this.d = qi0.d;
        this.e = qi0.e;
        this.f = qi0.f;
        this.g = qi0.g;
        this.h = qi0.h;
        this.i = qi0.i;
        String str = qi0.k;
        this.k = str;
        if (str != null) {
            c1839m9.put(str, this);
        }
        matrix.set(qi0.j);
        ArrayList arrayList = qi0.b;
        for (int i = 0; i < arrayList.size(); i++) {
            Object obj = arrayList.get(i);
            if (obj instanceof Qi0) {
                this.b.add(new Qi0((Qi0) obj, c1839m9));
            } else {
                if (obj instanceof Pi0) {
                    Pi0 pi0 = (Pi0) obj;
                    Pi0 pi02 = new Pi0(pi0);
                    pi02.e = 0.0f;
                    pi02.g = 1.0f;
                    pi02.h = 1.0f;
                    pi02.i = 0.0f;
                    pi02.j = 1.0f;
                    pi02.k = 0.0f;
                    pi02.l = Paint.Cap.BUTT;
                    pi02.m = Paint.Join.MITER;
                    pi02.n = 4.0f;
                    pi02.d = pi0.d;
                    pi02.e = pi0.e;
                    pi02.g = pi0.g;
                    pi02.f = pi0.f;
                    pi02.c = pi0.c;
                    pi02.h = pi0.h;
                    pi02.i = pi0.i;
                    pi02.j = pi0.j;
                    pi02.k = pi0.k;
                    pi02.l = pi0.l;
                    pi02.m = pi0.m;
                    pi02.n = pi0.n;
                    oi0 = pi02;
                } else if (obj instanceof Oi0) {
                    oi0 = new Oi0((Oi0) obj);
                } else {
                    throw new IllegalStateException("Unknown object in the tree!");
                }
                this.b.add(oi0);
                Object obj2 = oi0.b;
                if (obj2 != null) {
                    c1839m9.put(obj2, oi0);
                }
            }
        }
    }
}
