mirror of
https://github.com/VibedByKaKi/alexandroid.git
synced 2026-11-14 01:47:17 +01:00
143 lines
7.9 KiB
Java
143 lines
7.9 KiB
Java
package androidx.graphics.path;
|
|
|
|
import android.graphics.Path;
|
|
import android.graphics.PointF;
|
|
import androidx.graphics.path.PathIterator;
|
|
import androidx.graphics.path.PathSegment;
|
|
import com.amazon.alexa.voice.ui.ra.RaUiOptions;
|
|
import kotlin.Metadata;
|
|
import kotlin.jvm.internal.DefaultConstructorMarker;
|
|
import kotlin.jvm.internal.SourceDebugExtension;
|
|
import okio.Buffer$$ExternalSyntheticBUOutline0;
|
|
import org.jetbrains.annotations.NotNull;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
@Metadata(d1 = {"\u0000L\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0007\n\u0002\b\u0006\n\u0002\u0010\u0014\n\u0002\b\u0003\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\u0011\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0005\b \u0018\u0000 !2\u00020\u0001:\u0001!B!\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\b\b\u0002\u0010\u0004\u001a\u00020\u0005\u0012\b\b\u0002\u0010\u0006\u001a\u00020\u0007¢\u0006\u0002\u0010\bJ\u0010\u0010\u0011\u001a\u00020\u00122\u0006\u0010\u0013\u001a\u00020\u0014H&J#\u0010\u0015\u001a\b\u0012\u0004\u0012\u00020\u00170\u00162\u0006\u0010\r\u001a\u00020\u000e2\u0006\u0010\u0018\u001a\u00020\u0019H\u0002¢\u0006\u0002\u0010\u001aJ\b\u0010\u001b\u001a\u00020\u0014H&J\u0006\u0010\u001c\u001a\u00020\u001dJ\u001a\u0010\u001c\u001a\u00020\u00192\u0006\u0010\u001e\u001a\u00020\u000e2\b\b\u0002\u0010\u001f\u001a\u00020\u0012H&J\b\u0010 \u001a\u00020\u0019H&R\u0011\u0010\u0004\u001a\u00020\u0005¢\u0006\b\n\u0000\u001a\u0004\b\t\u0010\nR\u0011\u0010\u0002\u001a\u00020\u0003¢\u0006\b\n\u0000\u001a\u0004\b\u000b\u0010\fR\u000e\u0010\r\u001a\u00020\u000eX\u0082\u0004¢\u0006\u0002\n\u0000R\u0011\u0010\u0006\u001a\u00020\u0007¢\u0006\b\n\u0000\u001a\u0004\b\u000f\u0010\u0010¨\u0006\""}, d2 = {"Landroidx/graphics/path/PathIteratorImpl;", "", "path", "Landroid/graphics/Path;", "conicEvaluation", "Landroidx/graphics/path/PathIterator$ConicEvaluation;", "tolerance", "", "(Landroid/graphics/Path;Landroidx/graphics/path/PathIterator$ConicEvaluation;F)V", "getConicEvaluation", "()Landroidx/graphics/path/PathIterator$ConicEvaluation;", "getPath", "()Landroid/graphics/Path;", "pointsData", "", "getTolerance", "()F", "calculateSize", "", "includeConvertedConics", "", "floatsToPoints", "", "Landroid/graphics/PointF;", "type", "Landroidx/graphics/path/PathSegment$Type;", "([FLandroidx/graphics/path/PathSegment$Type;)[Landroid/graphics/PointF;", "hasNext", "next", "Landroidx/graphics/path/PathSegment;", "points", "offset", RaUiOptions.ENTER_ANIMATION_PEEK, "Companion", "graphics-path_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
|
@SourceDebugExtension({"SMAP\nPathIteratorImpl.kt\nKotlin\n*S Kotlin\n*F\n+ 1 PathIteratorImpl.kt\nandroidx/graphics/path/PathIteratorImpl\n+ 2 ArrayIntrinsics.kt\nkotlin/ArrayIntrinsicsKt\n*L\n1#1,304:1\n26#2:305\n*S KotlinDebug\n*F\n+ 1 PathIteratorImpl.kt\nandroidx/graphics/path/PathIteratorImpl\n*L\n104#1:305\n*E\n"})
|
|
/* loaded from: classes14.dex */
|
|
public abstract class PathIteratorImpl {
|
|
|
|
@NotNull
|
|
private static final Companion Companion = new Companion(null);
|
|
|
|
@NotNull
|
|
private final PathIterator.ConicEvaluation conicEvaluation;
|
|
|
|
@NotNull
|
|
private final Path path;
|
|
|
|
@NotNull
|
|
private final float[] pointsData;
|
|
private final float tolerance;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
|
|
public /* synthetic */ class WhenMappings {
|
|
public static final /* synthetic */ int[] $EnumSwitchMapping$0;
|
|
|
|
static {
|
|
int[] iArr = new int[PathSegment.Type.values().length];
|
|
try {
|
|
iArr[PathSegment.Type.Move.ordinal()] = 1;
|
|
} catch (NoSuchFieldError unused) {
|
|
}
|
|
try {
|
|
iArr[PathSegment.Type.Line.ordinal()] = 2;
|
|
} catch (NoSuchFieldError unused2) {
|
|
}
|
|
try {
|
|
iArr[PathSegment.Type.Quadratic.ordinal()] = 3;
|
|
} catch (NoSuchFieldError unused3) {
|
|
}
|
|
try {
|
|
iArr[PathSegment.Type.Conic.ordinal()] = 4;
|
|
} catch (NoSuchFieldError unused4) {
|
|
}
|
|
try {
|
|
iArr[PathSegment.Type.Cubic.ordinal()] = 5;
|
|
} catch (NoSuchFieldError unused5) {
|
|
}
|
|
$EnumSwitchMapping$0 = iArr;
|
|
}
|
|
}
|
|
|
|
static {
|
|
System.loadLibrary("androidx.graphics.path");
|
|
}
|
|
|
|
public PathIteratorImpl(@NotNull Path path, @NotNull PathIterator.ConicEvaluation conicEvaluation, float f) {
|
|
path.getClass();
|
|
conicEvaluation.getClass();
|
|
this.path = path;
|
|
this.conicEvaluation = conicEvaluation;
|
|
this.tolerance = f;
|
|
this.pointsData = new float[8];
|
|
}
|
|
|
|
private final PointF[] floatsToPoints(float[] pointsData, PathSegment.Type type) {
|
|
int i = WhenMappings.$EnumSwitchMapping$0[type.ordinal()];
|
|
return i != 1 ? i != 2 ? (i == 3 || i == 4) ? new PointF[]{new PointF(pointsData[0], pointsData[1]), new PointF(pointsData[2], pointsData[3]), new PointF(pointsData[4], pointsData[5])} : i != 5 ? new PointF[0] : new PointF[]{new PointF(pointsData[0], pointsData[1]), new PointF(pointsData[2], pointsData[3]), new PointF(pointsData[4], pointsData[5]), new PointF(pointsData[6], pointsData[7])} : new PointF[]{new PointF(pointsData[0], pointsData[1]), new PointF(pointsData[2], pointsData[3])} : new PointF[]{new PointF(pointsData[0], pointsData[1])};
|
|
}
|
|
|
|
public static /* synthetic */ PathSegment.Type next$default(PathIteratorImpl pathIteratorImpl, float[] fArr, int i, int i2, Object obj) {
|
|
if (obj != null) {
|
|
Buffer$$ExternalSyntheticBUOutline0.m$1("Super calls with default arguments not supported in this target, function: next");
|
|
return null;
|
|
}
|
|
if ((i2 & 2) != 0) {
|
|
i = 0;
|
|
}
|
|
return pathIteratorImpl.next(fArr, i);
|
|
}
|
|
|
|
public abstract int calculateSize(boolean includeConvertedConics);
|
|
|
|
@NotNull
|
|
public final PathIterator.ConicEvaluation getConicEvaluation() {
|
|
return this.conicEvaluation;
|
|
}
|
|
|
|
@NotNull
|
|
public final Path getPath() {
|
|
return this.path;
|
|
}
|
|
|
|
public final float getTolerance() {
|
|
return this.tolerance;
|
|
}
|
|
|
|
public abstract boolean hasNext();
|
|
|
|
@NotNull
|
|
public abstract PathSegment.Type next(@NotNull float[] points, int offset);
|
|
|
|
@NotNull
|
|
public final PathSegment next() {
|
|
PathSegment.Type next = next(this.pointsData, 0);
|
|
if (next == PathSegment.Type.Done) {
|
|
return PathSegmentUtilities.getDoneSegment();
|
|
}
|
|
if (next == PathSegment.Type.Close) {
|
|
return PathSegmentUtilities.getCloseSegment();
|
|
}
|
|
return new PathSegment(next, floatsToPoints(this.pointsData, next), next == PathSegment.Type.Conic ? this.pointsData[6] : 0.0f);
|
|
}
|
|
|
|
@NotNull
|
|
public abstract PathSegment.Type peek();
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
@Metadata(d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\b\u0082\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002¨\u0006\u0003"}, d2 = {"Landroidx/graphics/path/PathIteratorImpl$Companion;", "", "()V", "graphics-path_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
|
public static final class Companion {
|
|
public /* synthetic */ Companion(DefaultConstructorMarker defaultConstructorMarker) {
|
|
this();
|
|
}
|
|
|
|
private Companion() {
|
|
}
|
|
}
|
|
|
|
public /* synthetic */ PathIteratorImpl(Path path, PathIterator.ConicEvaluation conicEvaluation, float f, int i, DefaultConstructorMarker defaultConstructorMarker) {
|
|
this(path, (i & 2) != 0 ? PathIterator.ConicEvaluation.AsQuadratics : conicEvaluation, (i & 4) != 0 ? 0.25f : f);
|
|
}
|
|
}
|