alexandroid/decompiled/jadx/sources/androidx/transition/PathProperty.java
KaKi87 a47fad5135 📦 Add decompiled Alexa 2.2.730155.0 (jadx, apktool, Hermes strings)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 00:04:16 +01:00

56 lines
2 KiB
Java

package androidx.transition;
import android.graphics.Path;
import android.graphics.PathMeasure;
import android.graphics.PointF;
import android.util.Property;
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
/* loaded from: classes14.dex */
class PathProperty<T> extends Property<T, Float> {
private float mCurrentFraction;
private final float mPathLength;
private final PathMeasure mPathMeasure;
private final PointF mPointF;
private final float[] mPosition;
private final Property<T, PointF> mProperty;
public PathProperty(Property<T, PointF> property, Path path) {
super(Float.class, property.getName());
this.mPosition = new float[2];
this.mPointF = new PointF();
this.mProperty = property;
PathMeasure pathMeasure = new PathMeasure(path, false);
this.mPathMeasure = pathMeasure;
this.mPathLength = pathMeasure.getLength();
}
/* JADX WARN: Can't rename method to resolve collision */
@Override // android.util.Property
public Float get(T t) {
return Float.valueOf(this.mCurrentFraction);
}
/* renamed from: set, reason: avoid collision after fix types in other method */
public void set2(T t, Float f) {
this.mCurrentFraction = f.floatValue();
this.mPathMeasure.getPosTan(f.floatValue() * this.mPathLength, this.mPosition, null);
PointF pointF = this.mPointF;
float[] fArr = this.mPosition;
pointF.x = fArr[0];
pointF.y = fArr[1];
this.mProperty.set(t, pointF);
}
/* JADX WARN: Multi-variable type inference failed */
@Override // android.util.Property
public /* bridge */ /* synthetic */ Float get(Object obj) {
return get((PathProperty<T>) obj);
}
/* JADX WARN: Multi-variable type inference failed */
@Override // android.util.Property
public /* bridge */ /* synthetic */ void set(Object obj, Float f) {
set2((PathProperty<T>) obj, f);
}
}