mirror of
https://github.com/VibedByKaKi/alexandroid.git
synced 2026-11-21 05:13:20 +01:00
24 lines
866 B
Java
24 lines
866 B
Java
package com.google.android.material.transition;
|
|
|
|
import android.graphics.Path;
|
|
import android.graphics.PointF;
|
|
import androidx.annotation.NonNull;
|
|
import androidx.transition.PathMotion;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
/* loaded from: classes7.dex */
|
|
public final class MaterialArcMotion extends PathMotion {
|
|
private static PointF getControlPoint(float f, float f2, float f3, float f4) {
|
|
return f2 > f4 ? new PointF(f3, f2) : new PointF(f, f4);
|
|
}
|
|
|
|
@Override // androidx.transition.PathMotion
|
|
@NonNull
|
|
public Path getPath(float f, float f2, float f3, float f4) {
|
|
Path path = new Path();
|
|
path.moveTo(f, f2);
|
|
PointF controlPoint = getControlPoint(f, f2, f3, f4);
|
|
path.quadTo(controlPoint.x, controlPoint.y, f3, f4);
|
|
return path;
|
|
}
|
|
}
|