package t3;

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

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

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

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

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

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

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

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

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

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

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

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

    /* JADX INFO: renamed from: k, reason: collision with root package name */
    public final int f32898k;

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

    public j() {
        this.f32888a = new Matrix();
        this.f32889b = new ArrayList();
        this.f32890c = 0.0f;
        this.f32891d = 0.0f;
        this.f32892e = 0.0f;
        this.f32893f = 1.0f;
        this.f32894g = 1.0f;
        this.f32895h = 0.0f;
        this.f32896i = 0.0f;
        this.f32897j = new Matrix();
        this.f32899l = null;
    }

    @Override // t3.k
    public final boolean a() {
        int i10 = 0;
        while (true) {
            ArrayList arrayList = this.f32889b;
            if (i10 >= arrayList.size()) {
                return false;
            }
            if (((k) arrayList.get(i10)).a()) {
                return true;
            }
            i10++;
        }
    }

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

    public final void c() {
        Matrix matrix = this.f32897j;
        matrix.reset();
        matrix.postTranslate(-this.f32891d, -this.f32892e);
        matrix.postScale(this.f32893f, this.f32894g);
        matrix.postRotate(this.f32890c, 0.0f, 0.0f);
        matrix.postTranslate(this.f32895h + this.f32891d, this.f32896i + this.f32892e);
    }

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

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

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

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

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

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

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

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

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

    public void setPivotX(float f10) {
        if (f10 != this.f32891d) {
            this.f32891d = f10;
            c();
        }
    }

    public void setPivotY(float f10) {
        if (f10 != this.f32892e) {
            this.f32892e = f10;
            c();
        }
    }

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

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

    public void setScaleY(float f10) {
        if (f10 != this.f32894g) {
            this.f32894g = f10;
            c();
        }
    }

    public void setTranslateX(float f10) {
        if (f10 != this.f32895h) {
            this.f32895h = f10;
            c();
        }
    }

    public void setTranslateY(float f10) {
        if (f10 != this.f32896i) {
            this.f32896i = f10;
            c();
        }
    }

    public j(j jVar, androidx.collection.f fVar) {
        l hVar;
        this.f32888a = new Matrix();
        this.f32889b = new ArrayList();
        this.f32890c = 0.0f;
        this.f32891d = 0.0f;
        this.f32892e = 0.0f;
        this.f32893f = 1.0f;
        this.f32894g = 1.0f;
        this.f32895h = 0.0f;
        this.f32896i = 0.0f;
        Matrix matrix = new Matrix();
        this.f32897j = matrix;
        this.f32899l = null;
        this.f32890c = jVar.f32890c;
        this.f32891d = jVar.f32891d;
        this.f32892e = jVar.f32892e;
        this.f32893f = jVar.f32893f;
        this.f32894g = jVar.f32894g;
        this.f32895h = jVar.f32895h;
        this.f32896i = jVar.f32896i;
        String str = jVar.f32899l;
        this.f32899l = str;
        this.f32898k = jVar.f32898k;
        if (str != null) {
            fVar.put(str, this);
        }
        matrix.set(jVar.f32897j);
        ArrayList arrayList = jVar.f32889b;
        for (int i10 = 0; i10 < arrayList.size(); i10++) {
            Object obj = arrayList.get(i10);
            if (obj instanceof j) {
                this.f32889b.add(new j((j) obj, fVar));
            } else {
                if (obj instanceof i) {
                    i iVar = (i) obj;
                    i iVar2 = new i(iVar);
                    iVar2.f32878f = 0.0f;
                    iVar2.f32880h = 1.0f;
                    iVar2.f32881i = 1.0f;
                    iVar2.f32882j = 0.0f;
                    iVar2.f32883k = 1.0f;
                    iVar2.f32884l = 0.0f;
                    iVar2.f32885m = Paint.Cap.BUTT;
                    iVar2.f32886n = Paint.Join.MITER;
                    iVar2.f32887o = 4.0f;
                    iVar2.f32877e = iVar.f32877e;
                    iVar2.f32878f = iVar.f32878f;
                    iVar2.f32880h = iVar.f32880h;
                    iVar2.f32879g = iVar.f32879g;
                    iVar2.f32902c = iVar.f32902c;
                    iVar2.f32881i = iVar.f32881i;
                    iVar2.f32882j = iVar.f32882j;
                    iVar2.f32883k = iVar.f32883k;
                    iVar2.f32884l = iVar.f32884l;
                    iVar2.f32885m = iVar.f32885m;
                    iVar2.f32886n = iVar.f32886n;
                    iVar2.f32887o = iVar.f32887o;
                    hVar = iVar2;
                } else if (obj instanceof h) {
                    hVar = new h((h) obj);
                } else {
                    throw new IllegalStateException("Unknown object in the tree!");
                }
                this.f32889b.add(hVar);
                Object obj2 = hVar.f32901b;
                if (obj2 != null) {
                    fVar.put(obj2, hVar);
                }
            }
        }
    }
}
