mirror of
https://github.com/Pinball3D/Rabbit-R1.git
synced 2024-12-26 09:02:34 -06:00
190 lines
11 KiB
Java
190 lines
11 KiB
Java
package androidx.compose.ui.draw;
|
|
|
|
import androidx.compose.ui.Alignment;
|
|
import androidx.compose.ui.geometry.Size;
|
|
import androidx.compose.ui.graphics.ColorFilter;
|
|
import androidx.compose.ui.graphics.painter.Painter;
|
|
import androidx.compose.ui.layout.ContentScale;
|
|
import androidx.compose.ui.node.DrawModifierNodeKt;
|
|
import androidx.compose.ui.node.LayoutModifierNodeKt;
|
|
import androidx.compose.ui.node.ModifierNodeElement;
|
|
import androidx.compose.ui.platform.InspectorInfo;
|
|
import io.sentry.protocol.ViewHierarchyNode;
|
|
import kotlin.Metadata;
|
|
import kotlin.jvm.internal.Intrinsics;
|
|
|
|
/* compiled from: PainterModifier.kt */
|
|
@Metadata(d1 = {"\u0000T\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0007\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0017\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\b\u0082\b\u0018\u00002\b\u0012\u0004\u0012\u00020\u00020\u0001B7\u0012\u0006\u0010\u0003\u001a\u00020\u0004\u0012\u0006\u0010\u0005\u001a\u00020\u0006\u0012\u0006\u0010\u0007\u001a\u00020\b\u0012\u0006\u0010\t\u001a\u00020\n\u0012\u0006\u0010\u000b\u001a\u00020\f\u0012\b\u0010\r\u001a\u0004\u0018\u00010\u000e¢\u0006\u0002\u0010\u000fJ\t\u0010\u001c\u001a\u00020\u0004HÆ\u0003J\t\u0010\u001d\u001a\u00020\u0006HÆ\u0003J\t\u0010\u001e\u001a\u00020\bHÆ\u0003J\t\u0010\u001f\u001a\u00020\nHÆ\u0003J\t\u0010 \u001a\u00020\fHÆ\u0003J\u000b\u0010!\u001a\u0004\u0018\u00010\u000eHÆ\u0003JG\u0010\"\u001a\u00020\u00002\b\b\u0002\u0010\u0003\u001a\u00020\u00042\b\b\u0002\u0010\u0005\u001a\u00020\u00062\b\b\u0002\u0010\u0007\u001a\u00020\b2\b\b\u0002\u0010\t\u001a\u00020\n2\b\b\u0002\u0010\u000b\u001a\u00020\f2\n\b\u0002\u0010\r\u001a\u0004\u0018\u00010\u000eHÆ\u0001J\b\u0010#\u001a\u00020\u0002H\u0016J\u0013\u0010$\u001a\u00020\u00062\b\u0010%\u001a\u0004\u0018\u00010&HÖ\u0003J\t\u0010'\u001a\u00020(HÖ\u0001J\t\u0010)\u001a\u00020*HÖ\u0001J\u0010\u0010+\u001a\u00020,2\u0006\u0010-\u001a\u00020\u0002H\u0016J\f\u0010.\u001a\u00020,*\u00020/H\u0016R\u0011\u0010\u0007\u001a\u00020\b¢\u0006\b\n\u0000\u001a\u0004\b\u0010\u0010\u0011R\u0011\u0010\u000b\u001a\u00020\f¢\u0006\b\n\u0000\u001a\u0004\b\u0012\u0010\u0013R\u0013\u0010\r\u001a\u0004\u0018\u00010\u000e¢\u0006\b\n\u0000\u001a\u0004\b\u0014\u0010\u0015R\u0011\u0010\t\u001a\u00020\n¢\u0006\b\n\u0000\u001a\u0004\b\u0016\u0010\u0017R\u0011\u0010\u0003\u001a\u00020\u0004¢\u0006\b\n\u0000\u001a\u0004\b\u0018\u0010\u0019R\u0011\u0010\u0005\u001a\u00020\u0006¢\u0006\b\n\u0000\u001a\u0004\b\u001a\u0010\u001b¨\u00060"}, d2 = {"Landroidx/compose/ui/draw/PainterElement;", "Landroidx/compose/ui/node/ModifierNodeElement;", "Landroidx/compose/ui/draw/PainterNode;", "painter", "Landroidx/compose/ui/graphics/painter/Painter;", "sizeToIntrinsics", "", "alignment", "Landroidx/compose/ui/Alignment;", "contentScale", "Landroidx/compose/ui/layout/ContentScale;", ViewHierarchyNode.JsonKeys.ALPHA, "", "colorFilter", "Landroidx/compose/ui/graphics/ColorFilter;", "(Landroidx/compose/ui/graphics/painter/Painter;ZLandroidx/compose/ui/Alignment;Landroidx/compose/ui/layout/ContentScale;FLandroidx/compose/ui/graphics/ColorFilter;)V", "getAlignment", "()Landroidx/compose/ui/Alignment;", "getAlpha", "()F", "getColorFilter", "()Landroidx/compose/ui/graphics/ColorFilter;", "getContentScale", "()Landroidx/compose/ui/layout/ContentScale;", "getPainter", "()Landroidx/compose/ui/graphics/painter/Painter;", "getSizeToIntrinsics", "()Z", "component1", "component2", "component3", "component4", "component5", "component6", "copy", "create", "equals", "other", "", "hashCode", "", "toString", "", "update", "", "node", "inspectableProperties", "Landroidx/compose/ui/platform/InspectorInfo;", "ui_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
|
|
/* loaded from: classes.dex */
|
|
final /* data */ class PainterElement extends ModifierNodeElement<PainterNode> {
|
|
private final Alignment alignment;
|
|
private final float alpha;
|
|
private final ColorFilter colorFilter;
|
|
private final ContentScale contentScale;
|
|
private final Painter painter;
|
|
private final boolean sizeToIntrinsics;
|
|
|
|
public static /* synthetic */ PainterElement copy$default(PainterElement painterElement, Painter painter, boolean z, Alignment alignment, ContentScale contentScale, float f, ColorFilter colorFilter, int i, Object obj) {
|
|
if ((i & 1) != 0) {
|
|
painter = painterElement.painter;
|
|
}
|
|
if ((i & 2) != 0) {
|
|
z = painterElement.sizeToIntrinsics;
|
|
}
|
|
boolean z2 = z;
|
|
if ((i & 4) != 0) {
|
|
alignment = painterElement.alignment;
|
|
}
|
|
Alignment alignment2 = alignment;
|
|
if ((i & 8) != 0) {
|
|
contentScale = painterElement.contentScale;
|
|
}
|
|
ContentScale contentScale2 = contentScale;
|
|
if ((i & 16) != 0) {
|
|
f = painterElement.alpha;
|
|
}
|
|
float f2 = f;
|
|
if ((i & 32) != 0) {
|
|
colorFilter = painterElement.colorFilter;
|
|
}
|
|
return painterElement.copy(painter, z2, alignment2, contentScale2, f2, colorFilter);
|
|
}
|
|
|
|
/* renamed from: component1, reason: from getter */
|
|
public final Painter getPainter() {
|
|
return this.painter;
|
|
}
|
|
|
|
/* renamed from: component2, reason: from getter */
|
|
public final boolean getSizeToIntrinsics() {
|
|
return this.sizeToIntrinsics;
|
|
}
|
|
|
|
/* renamed from: component3, reason: from getter */
|
|
public final Alignment getAlignment() {
|
|
return this.alignment;
|
|
}
|
|
|
|
/* renamed from: component4, reason: from getter */
|
|
public final ContentScale getContentScale() {
|
|
return this.contentScale;
|
|
}
|
|
|
|
/* renamed from: component5, reason: from getter */
|
|
public final float getAlpha() {
|
|
return this.alpha;
|
|
}
|
|
|
|
/* renamed from: component6, reason: from getter */
|
|
public final ColorFilter getColorFilter() {
|
|
return this.colorFilter;
|
|
}
|
|
|
|
public final PainterElement copy(Painter painter, boolean sizeToIntrinsics, Alignment alignment, ContentScale contentScale, float alpha, ColorFilter colorFilter) {
|
|
Intrinsics.checkNotNullParameter(painter, "painter");
|
|
Intrinsics.checkNotNullParameter(alignment, "alignment");
|
|
Intrinsics.checkNotNullParameter(contentScale, "contentScale");
|
|
return new PainterElement(painter, sizeToIntrinsics, alignment, contentScale, alpha, colorFilter);
|
|
}
|
|
|
|
@Override // androidx.compose.ui.node.ModifierNodeElement
|
|
public boolean equals(Object other) {
|
|
if (this == other) {
|
|
return true;
|
|
}
|
|
if (!(other instanceof PainterElement)) {
|
|
return false;
|
|
}
|
|
PainterElement painterElement = (PainterElement) other;
|
|
return Intrinsics.areEqual(this.painter, painterElement.painter) && this.sizeToIntrinsics == painterElement.sizeToIntrinsics && Intrinsics.areEqual(this.alignment, painterElement.alignment) && Intrinsics.areEqual(this.contentScale, painterElement.contentScale) && Float.compare(this.alpha, painterElement.alpha) == 0 && Intrinsics.areEqual(this.colorFilter, painterElement.colorFilter);
|
|
}
|
|
|
|
public final Alignment getAlignment() {
|
|
return this.alignment;
|
|
}
|
|
|
|
public final float getAlpha() {
|
|
return this.alpha;
|
|
}
|
|
|
|
public final ColorFilter getColorFilter() {
|
|
return this.colorFilter;
|
|
}
|
|
|
|
public final ContentScale getContentScale() {
|
|
return this.contentScale;
|
|
}
|
|
|
|
public final Painter getPainter() {
|
|
return this.painter;
|
|
}
|
|
|
|
public final boolean getSizeToIntrinsics() {
|
|
return this.sizeToIntrinsics;
|
|
}
|
|
|
|
/* JADX WARN: Multi-variable type inference failed */
|
|
@Override // androidx.compose.ui.node.ModifierNodeElement
|
|
public int hashCode() {
|
|
int hashCode = this.painter.hashCode() * 31;
|
|
boolean z = this.sizeToIntrinsics;
|
|
int i = z;
|
|
if (z != 0) {
|
|
i = 1;
|
|
}
|
|
int hashCode2 = (((((((hashCode + i) * 31) + this.alignment.hashCode()) * 31) + this.contentScale.hashCode()) * 31) + Float.hashCode(this.alpha)) * 31;
|
|
ColorFilter colorFilter = this.colorFilter;
|
|
return hashCode2 + (colorFilter == null ? 0 : colorFilter.hashCode());
|
|
}
|
|
|
|
public String toString() {
|
|
return "PainterElement(painter=" + this.painter + ", sizeToIntrinsics=" + this.sizeToIntrinsics + ", alignment=" + this.alignment + ", contentScale=" + this.contentScale + ", alpha=" + this.alpha + ", colorFilter=" + this.colorFilter + ')';
|
|
}
|
|
|
|
public PainterElement(Painter painter, boolean z, Alignment alignment, ContentScale contentScale, float f, ColorFilter colorFilter) {
|
|
Intrinsics.checkNotNullParameter(painter, "painter");
|
|
Intrinsics.checkNotNullParameter(alignment, "alignment");
|
|
Intrinsics.checkNotNullParameter(contentScale, "contentScale");
|
|
this.painter = painter;
|
|
this.sizeToIntrinsics = z;
|
|
this.alignment = alignment;
|
|
this.contentScale = contentScale;
|
|
this.alpha = f;
|
|
this.colorFilter = colorFilter;
|
|
}
|
|
|
|
@Override // androidx.compose.ui.node.ModifierNodeElement
|
|
public PainterNode create() {
|
|
return new PainterNode(this.painter, this.sizeToIntrinsics, this.alignment, this.contentScale, this.alpha, this.colorFilter);
|
|
}
|
|
|
|
@Override // androidx.compose.ui.node.ModifierNodeElement
|
|
public void update(PainterNode node) {
|
|
Intrinsics.checkNotNullParameter(node, "node");
|
|
boolean sizeToIntrinsics = node.getSizeToIntrinsics();
|
|
boolean z = this.sizeToIntrinsics;
|
|
boolean z2 = sizeToIntrinsics != z || (z && !Size.m2465equalsimpl0(node.getPainter().getIntrinsicSize(), this.painter.getIntrinsicSize()));
|
|
node.setPainter(this.painter);
|
|
node.setSizeToIntrinsics(this.sizeToIntrinsics);
|
|
node.setAlignment(this.alignment);
|
|
node.setContentScale(this.contentScale);
|
|
node.setAlpha(this.alpha);
|
|
node.setColorFilter(this.colorFilter);
|
|
if (z2) {
|
|
LayoutModifierNodeKt.invalidateMeasurement(node);
|
|
}
|
|
DrawModifierNodeKt.invalidateDraw(node);
|
|
}
|
|
|
|
@Override // androidx.compose.ui.node.ModifierNodeElement
|
|
public void inspectableProperties(InspectorInfo inspectorInfo) {
|
|
Intrinsics.checkNotNullParameter(inspectorInfo, "<this>");
|
|
inspectorInfo.setName("paint");
|
|
inspectorInfo.getProperties().set("painter", this.painter);
|
|
inspectorInfo.getProperties().set("sizeToIntrinsics", Boolean.valueOf(this.sizeToIntrinsics));
|
|
inspectorInfo.getProperties().set("alignment", this.alignment);
|
|
inspectorInfo.getProperties().set("contentScale", this.contentScale);
|
|
inspectorInfo.getProperties().set(ViewHierarchyNode.JsonKeys.ALPHA, Float.valueOf(this.alpha));
|
|
inspectorInfo.getProperties().set("colorFilter", this.colorFilter);
|
|
}
|
|
}
|