package d2;

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

/* JADX INFO: loaded from: classes.dex */
public final class k extends l {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    public final Matrix f11371a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    public final ArrayList f11372b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    public float f11373c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    public float f11374d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    public float f11375e;

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public float f11376f;

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    public float f11377g;

    /* JADX INFO: renamed from: h, reason: collision with root package name */
    public float f11378h;
    public float i;

    /* JADX INFO: renamed from: j, reason: collision with root package name */
    public final Matrix f11379j;

    /* JADX INFO: renamed from: k, reason: collision with root package name */
    public String f11380k;

    public k() {
        this.f11371a = new Matrix();
        this.f11372b = new ArrayList();
        this.f11373c = 0.0f;
        this.f11374d = 0.0f;
        this.f11375e = 0.0f;
        this.f11376f = 1.0f;
        this.f11377g = 1.0f;
        this.f11378h = 0.0f;
        this.i = 0.0f;
        this.f11379j = new Matrix();
        this.f11380k = null;
    }

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

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

    public final void c() {
        Matrix matrix = this.f11379j;
        matrix.reset();
        matrix.postTranslate(-this.f11374d, -this.f11375e);
        matrix.postScale(this.f11376f, this.f11377g);
        matrix.postRotate(this.f11373c, 0.0f, 0.0f);
        matrix.postTranslate(this.f11378h + this.f11374d, this.i + this.f11375e);
    }

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

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

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

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

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

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

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

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

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

    public void setPivotX(float f3) {
        if (f3 != this.f11374d) {
            this.f11374d = f3;
            c();
        }
    }

    public void setPivotY(float f3) {
        if (f3 != this.f11375e) {
            this.f11375e = f3;
            c();
        }
    }

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

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

    public void setScaleY(float f3) {
        if (f3 != this.f11377g) {
            this.f11377g = f3;
            c();
        }
    }

    public void setTranslateX(float f3) {
        if (f3 != this.f11378h) {
            this.f11378h = f3;
            c();
        }
    }

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

    public k(k kVar, q.e eVar) {
        m iVar;
        this.f11371a = new Matrix();
        this.f11372b = new ArrayList();
        this.f11373c = 0.0f;
        this.f11374d = 0.0f;
        this.f11375e = 0.0f;
        this.f11376f = 1.0f;
        this.f11377g = 1.0f;
        this.f11378h = 0.0f;
        this.i = 0.0f;
        Matrix matrix = new Matrix();
        this.f11379j = matrix;
        this.f11380k = null;
        this.f11373c = kVar.f11373c;
        this.f11374d = kVar.f11374d;
        this.f11375e = kVar.f11375e;
        this.f11376f = kVar.f11376f;
        this.f11377g = kVar.f11377g;
        this.f11378h = kVar.f11378h;
        this.i = kVar.i;
        String str = kVar.f11380k;
        this.f11380k = str;
        if (str != null) {
            eVar.put(str, this);
        }
        matrix.set(kVar.f11379j);
        ArrayList arrayList = kVar.f11372b;
        for (int i = 0; i < arrayList.size(); i++) {
            Object obj = arrayList.get(i);
            if (obj instanceof k) {
                this.f11372b.add(new k((k) obj, eVar));
            } else {
                if (obj instanceof j) {
                    j jVar = (j) obj;
                    j jVar2 = new j(jVar);
                    jVar2.f11362e = 0.0f;
                    jVar2.f11364g = 1.0f;
                    jVar2.f11365h = 1.0f;
                    jVar2.i = 0.0f;
                    jVar2.f11366j = 1.0f;
                    jVar2.f11367k = 0.0f;
                    jVar2.f11368l = Paint.Cap.BUTT;
                    jVar2.f11369m = Paint.Join.MITER;
                    jVar2.f11370n = 4.0f;
                    jVar2.f11361d = jVar.f11361d;
                    jVar2.f11362e = jVar.f11362e;
                    jVar2.f11364g = jVar.f11364g;
                    jVar2.f11363f = jVar.f11363f;
                    jVar2.f11383c = jVar.f11383c;
                    jVar2.f11365h = jVar.f11365h;
                    jVar2.i = jVar.i;
                    jVar2.f11366j = jVar.f11366j;
                    jVar2.f11367k = jVar.f11367k;
                    jVar2.f11368l = jVar.f11368l;
                    jVar2.f11369m = jVar.f11369m;
                    jVar2.f11370n = jVar.f11370n;
                    iVar = jVar2;
                } else if (obj instanceof i) {
                    iVar = new i((i) obj);
                } else {
                    throw new IllegalStateException("Unknown object in the tree!");
                }
                this.f11372b.add(iVar);
                Object obj2 = iVar.f11382b;
                if (obj2 != null) {
                    eVar.put(obj2, iVar);
                }
            }
        }
    }
}
