mirror of
https://github.com/VibedByKaKi/alexandroid.git
synced 2026-11-14 01:47:17 +01:00
91 lines
5.5 KiB
Java
91 lines
5.5 KiB
Java
package androidx.graphics.path;
|
|
|
|
import android.graphics.Path;
|
|
import androidx.annotation.RequiresApi;
|
|
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 org.jetbrains.annotations.NotNull;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
@RequiresApi(34)
|
|
@Metadata(d1 = {"\u0000F\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0007\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0014\n\u0002\b\u0003\b\u0001\u0018\u00002\u00020\u0001B!\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\r\u001a\u00020\u000e2\u0006\u0010\u000f\u001a\u00020\u0010H\u0016J\b\u0010\u0011\u001a\u00020\u0010H\u0016J\u0018\u0010\u0012\u001a\u00020\u00132\u0006\u0010\u0014\u001a\u00020\u00152\u0006\u0010\u0016\u001a\u00020\u000eH\u0016J\b\u0010\u0017\u001a\u00020\u0013H\u0016R\u000e\u0010\t\u001a\u00020\nX\u0082\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\u000b\u001a\u00020\fX\u0082\u0004¢\u0006\u0002\n\u0000¨\u0006\u0018"}, d2 = {"Landroidx/graphics/path/PathIteratorApi34Impl;", "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", "conicConverter", "Landroidx/graphics/path/ConicConverter;", "platformIterator", "Landroid/graphics/PathIterator;", "calculateSize", "", "includeConvertedConics", "", "hasNext", "next", "Landroidx/graphics/path/PathSegment$Type;", "points", "", "offset", RaUiOptions.ENTER_ANIMATION_PEEK, "graphics-path_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
|
/* loaded from: classes14.dex */
|
|
public final class PathIteratorApi34Impl extends PathIteratorImpl {
|
|
|
|
@NotNull
|
|
private final ConicConverter conicConverter;
|
|
|
|
@NotNull
|
|
private final android.graphics.PathIterator platformIterator;
|
|
|
|
/* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */
|
|
public PathIteratorApi34Impl(@NotNull Path path, @NotNull PathIterator.ConicEvaluation conicEvaluation, float f) {
|
|
super(path, conicEvaluation, f);
|
|
path.getClass();
|
|
conicEvaluation.getClass();
|
|
android.graphics.PathIterator pathIterator = path.getPathIterator();
|
|
pathIterator.getClass();
|
|
this.platformIterator = pathIterator;
|
|
this.conicConverter = new ConicConverter();
|
|
}
|
|
|
|
@Override // androidx.graphics.path.PathIteratorImpl
|
|
public int calculateSize(boolean includeConvertedConics) {
|
|
boolean z = includeConvertedConics && getConicEvaluation() == PathIterator.ConicEvaluation.AsQuadratics;
|
|
android.graphics.PathIterator pathIterator = getPath().getPathIterator();
|
|
pathIterator.getClass();
|
|
float[] fArr = new float[8];
|
|
int i = 0;
|
|
while (pathIterator.hasNext()) {
|
|
if (pathIterator.next(fArr, 0) == 3 && z) {
|
|
ConicConverter conicConverter = this.conicConverter;
|
|
ConicConverter.convert$default(conicConverter, fArr, fArr[6], getTolerance(), 0, 8, null);
|
|
i += conicConverter.getQuadraticCount();
|
|
} else {
|
|
i++;
|
|
}
|
|
}
|
|
return i;
|
|
}
|
|
|
|
@Override // androidx.graphics.path.PathIteratorImpl
|
|
public boolean hasNext() {
|
|
return this.platformIterator.hasNext();
|
|
}
|
|
|
|
@Override // androidx.graphics.path.PathIteratorImpl
|
|
@NotNull
|
|
public PathSegment.Type next(@NotNull float[] points, int offset) {
|
|
PathSegment.Type platformToAndroidXSegmentType;
|
|
points.getClass();
|
|
if (this.conicConverter.getCurrentQuadratic() < this.conicConverter.getQuadraticCount()) {
|
|
this.conicConverter.nextQuadratic(points, offset);
|
|
return PathSegment.Type.Quadratic;
|
|
}
|
|
platformToAndroidXSegmentType = PathIteratorImplKt.platformToAndroidXSegmentType(this.platformIterator.next(points, offset));
|
|
if (platformToAndroidXSegmentType != PathSegment.Type.Conic || getConicEvaluation() != PathIterator.ConicEvaluation.AsQuadratics) {
|
|
return platformToAndroidXSegmentType;
|
|
}
|
|
ConicConverter conicConverter = this.conicConverter;
|
|
conicConverter.convert(points, points[offset + 6], getTolerance(), offset);
|
|
if (conicConverter.getQuadraticCount() > 0) {
|
|
conicConverter.nextQuadratic(points, offset);
|
|
}
|
|
return PathSegment.Type.Quadratic;
|
|
}
|
|
|
|
@Override // androidx.graphics.path.PathIteratorImpl
|
|
@NotNull
|
|
public PathSegment.Type peek() {
|
|
PathSegment.Type platformToAndroidXSegmentType;
|
|
platformToAndroidXSegmentType = PathIteratorImplKt.platformToAndroidXSegmentType(this.platformIterator.peek());
|
|
return platformToAndroidXSegmentType;
|
|
}
|
|
|
|
public /* synthetic */ PathIteratorApi34Impl(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);
|
|
}
|
|
}
|