package j0;

import android.graphics.Path;
import android.graphics.PathMeasure;
import android.graphics.PointF;
import android.util.Property;

/* JADX INFO: compiled from: PathProperty.java */
/* JADX INFO: loaded from: classes.dex */
class h<T> extends Property<T, Float> {

    /* JADX INFO: renamed from: a, reason: collision with root package name */
    private final Property<T, PointF> f4961a;

    /* JADX INFO: renamed from: b, reason: collision with root package name */
    private final PathMeasure f4962b;

    /* JADX INFO: renamed from: c, reason: collision with root package name */
    private final float f4963c;

    /* JADX INFO: renamed from: d, reason: collision with root package name */
    private final float[] f4964d;

    /* JADX INFO: renamed from: e, reason: collision with root package name */
    private final PointF f4965e;

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

    h(Property<T, PointF> property, Path path) {
        super(Float.class, property.getName());
        this.f4964d = new float[2];
        this.f4965e = new PointF();
        this.f4961a = property;
        PathMeasure pathMeasure = new PathMeasure(path, false);
        this.f4962b = pathMeasure;
        this.f4963c = pathMeasure.getLength();
    }

    @Override // android.util.Property
    /* JADX INFO: renamed from: a, reason: merged with bridge method [inline-methods] */
    public Float get(T t2) {
        return Float.valueOf(this.f4966f);
    }

    @Override // android.util.Property
    /* JADX INFO: renamed from: b, reason: merged with bridge method [inline-methods] */
    public void set(T t2, Float f3) {
        this.f4966f = f3.floatValue();
        this.f4962b.getPosTan(this.f4963c * f3.floatValue(), this.f4964d, null);
        PointF pointF = this.f4965e;
        float[] fArr = this.f4964d;
        pointF.x = fArr[0];
        pointF.y = fArr[1];
        this.f4961a.set(t2, pointF);
    }
}
