package x3;

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

/* JADX INFO: loaded from: classes.dex */
public final class t {

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

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

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

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

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

    /* JADX INFO: renamed from: f, reason: collision with root package name */
    public final ArrayList f18670f = new ArrayList();

    /* JADX INFO: renamed from: g, reason: collision with root package name */
    public final ArrayList f18671g = new ArrayList();

    public t() {
        d(0.0f, 270.0f, 0.0f);
    }

    public final void a(float f3) {
        float f7 = this.f18668d;
        if (f7 == f3) {
            return;
        }
        float f8 = ((f3 - f7) + 360.0f) % 360.0f;
        if (f8 > 180.0f) {
            return;
        }
        float f9 = this.f18666b;
        float f10 = this.f18667c;
        p pVar = new p(f9, f10, f9, f10);
        pVar.f18659f = this.f18668d;
        pVar.f18660g = f8;
        this.f18671g.add(new n(pVar));
        this.f18668d = f3;
    }

    public final void b(Matrix matrix, Path path) {
        ArrayList arrayList = this.f18670f;
        int size = arrayList.size();
        for (int i = 0; i < size; i++) {
            ((r) arrayList.get(i)).a(matrix, path);
        }
    }

    public final void c(float f3, float f7) {
        q qVar = new q();
        qVar.f18661b = f3;
        qVar.f18662c = f7;
        this.f18670f.add(qVar);
        o oVar = new o(qVar, this.f18666b, this.f18667c);
        float fB = oVar.b() + 270.0f;
        float fB2 = oVar.b() + 270.0f;
        a(fB);
        this.f18671g.add(oVar);
        this.f18668d = fB2;
        this.f18666b = f3;
        this.f18667c = f7;
    }

    public final void d(float f3, float f7, float f8) {
        this.f18665a = f3;
        this.f18666b = 0.0f;
        this.f18667c = f3;
        this.f18668d = f7;
        this.f18669e = (f7 + f8) % 360.0f;
        this.f18670f.clear();
        this.f18671g.clear();
    }
}
