Rabbit-R1/switch port/java/sources/androidx/compose/ui/graphics/SweepGradient.java
2024-05-21 17:08:36 -04:00

68 lines
4.8 KiB
Java

package androidx.compose.ui.graphics;
import android.graphics.Shader;
import androidx.compose.ui.geometry.Offset;
import androidx.compose.ui.geometry.OffsetKt;
import androidx.compose.ui.geometry.Size;
import androidx.compose.ui.geometry.SizeKt;
import java.util.List;
import kotlin.Metadata;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
/* compiled from: Brush.kt */
@Metadata(d1 = {"\u0000L\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0007\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u000e\n\u0000\b\u0007\u0018\u00002\u00020\u0001B2\b\u0000\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\f\u0010\u0004\u001a\b\u0012\u0004\u0012\u00020\u00060\u0005\u0012\u0010\b\u0002\u0010\u0007\u001a\n\u0012\u0004\u0012\u00020\b\u0018\u00010\u0005ø\u0001\u0000¢\u0006\u0002\u0010\tJ!\u0010\u000b\u001a\u00060\fj\u0002`\r2\u0006\u0010\u000e\u001a\u00020\u000fH\u0016ø\u0001\u0001ø\u0001\u0000¢\u0006\u0004\b\u0010\u0010\u0011J\u0013\u0010\u0012\u001a\u00020\u00132\b\u0010\u0014\u001a\u0004\u0018\u00010\u0015H\u0096\u0002J\b\u0010\u0016\u001a\u00020\u0017H\u0016J\b\u0010\u0018\u001a\u00020\u0019H\u0016R\u0019\u0010\u0002\u001a\u00020\u0003X\u0082\u0004ø\u0001\u0000ø\u0001\u0001ø\u0001\u0002¢\u0006\u0004\n\u0002\u0010\nR\u0017\u0010\u0004\u001a\b\u0012\u0004\u0012\u00020\u00060\u0005X\u0082\u0004ø\u0001\u0000¢\u0006\u0002\n\u0000R\u0016\u0010\u0007\u001a\n\u0012\u0004\u0012\u00020\b\u0018\u00010\u0005X\u0082\u0004¢\u0006\u0002\n\u0000\u0082\u0002\u000f\n\u0002\b\u0019\n\u0005\\u001e0\u0001\n\u0002\b!¨\u0006\u001a"}, d2 = {"Landroidx/compose/ui/graphics/SweepGradient;", "Landroidx/compose/ui/graphics/ShaderBrush;", "center", "Landroidx/compose/ui/geometry/Offset;", "colors", "", "Landroidx/compose/ui/graphics/Color;", "stops", "", "(JLjava/util/List;Ljava/util/List;Lkotlin/jvm/internal/DefaultConstructorMarker;)V", "J", "createShader", "Landroid/graphics/Shader;", "Landroidx/compose/ui/graphics/Shader;", "size", "Landroidx/compose/ui/geometry/Size;", "createShader-uvyYCjk", "(J)Landroid/graphics/Shader;", "equals", "", "other", "", "hashCode", "", "toString", "", "ui-graphics_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
/* loaded from: classes.dex */
public final class SweepGradient extends ShaderBrush {
private final long center;
private final List<Color> colors;
private final List<Float> stops;
public /* synthetic */ SweepGradient(long j, List list, List list2, DefaultConstructorMarker defaultConstructorMarker) {
this(j, list, list2);
}
public /* synthetic */ SweepGradient(long j, List list, List list2, int i, DefaultConstructorMarker defaultConstructorMarker) {
this(j, list, (i & 4) != 0 ? null : list2, null);
}
private SweepGradient(long j, List<Color> colors, List<Float> list) {
Intrinsics.checkNotNullParameter(colors, "colors");
this.center = j;
this.colors = colors;
this.stops = list;
}
@Override // androidx.compose.ui.graphics.ShaderBrush
/* renamed from: createShader-uvyYCjk */
public Shader mo2608createShaderuvyYCjk(long size) {
long Offset;
if (OffsetKt.m2421isUnspecifiedk4lQ0M(this.center)) {
Offset = SizeKt.m2479getCenteruvyYCjk(size);
} else {
Offset = OffsetKt.Offset(Offset.m2400getXimpl(this.center) == Float.POSITIVE_INFINITY ? Size.m2469getWidthimpl(size) : Offset.m2400getXimpl(this.center), Offset.m2401getYimpl(this.center) == Float.POSITIVE_INFINITY ? Size.m2466getHeightimpl(size) : Offset.m2401getYimpl(this.center));
}
return ShaderKt.m2951SweepGradientShader9KIMszo(Offset, this.colors, this.stops);
}
public boolean equals(Object other) {
if (this == other) {
return true;
}
if (!(other instanceof SweepGradient)) {
return false;
}
SweepGradient sweepGradient = (SweepGradient) other;
return Offset.m2397equalsimpl0(this.center, sweepGradient.center) && Intrinsics.areEqual(this.colors, sweepGradient.colors) && Intrinsics.areEqual(this.stops, sweepGradient.stops);
}
public int hashCode() {
int m2402hashCodeimpl = ((Offset.m2402hashCodeimpl(this.center) * 31) + this.colors.hashCode()) * 31;
List<Float> list = this.stops;
return m2402hashCodeimpl + (list != null ? list.hashCode() : 0);
}
public String toString() {
return "SweepGradient(" + (OffsetKt.m2419isSpecifiedk4lQ0M(this.center) ? "center=" + ((Object) Offset.m2408toStringimpl(this.center)) + ", " : "") + "colors=" + this.colors + ", stops=" + this.stops + ')';
}
}