- Added realracing3-community.apk (71.57 MB) - Removed 32-bit support (armeabi-v7a) - Only includes arm64-v8a libraries - Decompiled source code included - Added README-community.md with analysis
228 lines
6.3 KiB
Java
228 lines
6.3 KiB
Java
package androidx.core.graphics;
|
|
|
|
import android.annotation.SuppressLint;
|
|
import android.graphics.Matrix;
|
|
import android.graphics.Point;
|
|
import android.graphics.PointF;
|
|
import android.graphics.Rect;
|
|
import android.graphics.RectF;
|
|
import android.graphics.Region;
|
|
import kotlin.jvm.internal.SourceDebugExtension;
|
|
|
|
@SourceDebugExtension({"SMAP\nRect.kt\nKotlin\n*S Kotlin\n*F\n+ 1 Rect.kt\nandroidx/core/graphics/RectKt\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,294:1\n278#1,3:296\n211#1,6:299\n114#1:305\n122#1:307\n278#1,3:309\n278#1,3:312\n1#2:295\n1#2:306\n1#2:308\n*S KotlinDebug\n*F\n+ 1 Rect.kt\nandroidx/core/graphics/RectKt\n*L\n161#1:296,3\n207#1:299,6\n220#1:305\n223#1:307\n253#1:309,3\n290#1:312,3\n220#1:306\n223#1:308\n*E\n"})
|
|
/* loaded from: classes.dex */
|
|
public final class RectKt {
|
|
public static final int component1(Rect rect) {
|
|
return rect.left;
|
|
}
|
|
|
|
public static final int component2(Rect rect) {
|
|
return rect.top;
|
|
}
|
|
|
|
public static final int component3(Rect rect) {
|
|
return rect.right;
|
|
}
|
|
|
|
public static final int component4(Rect rect) {
|
|
return rect.bottom;
|
|
}
|
|
|
|
public static final float component1(RectF rectF) {
|
|
return rectF.left;
|
|
}
|
|
|
|
public static final float component2(RectF rectF) {
|
|
return rectF.top;
|
|
}
|
|
|
|
public static final float component3(RectF rectF) {
|
|
return rectF.right;
|
|
}
|
|
|
|
public static final float component4(RectF rectF) {
|
|
return rectF.bottom;
|
|
}
|
|
|
|
public static final Rect or(Rect rect, Rect rect2) {
|
|
Rect rect3 = new Rect(rect);
|
|
rect3.union(rect2);
|
|
return rect3;
|
|
}
|
|
|
|
public static final Rect plus(Rect rect, Rect rect2) {
|
|
Rect rect3 = new Rect(rect);
|
|
rect3.union(rect2);
|
|
return rect3;
|
|
}
|
|
|
|
public static final RectF or(RectF rectF, RectF rectF2) {
|
|
RectF rectF3 = new RectF(rectF);
|
|
rectF3.union(rectF2);
|
|
return rectF3;
|
|
}
|
|
|
|
public static final RectF plus(RectF rectF, RectF rectF2) {
|
|
RectF rectF3 = new RectF(rectF);
|
|
rectF3.union(rectF2);
|
|
return rectF3;
|
|
}
|
|
|
|
public static final Rect plus(Rect rect, int i) {
|
|
Rect rect2 = new Rect(rect);
|
|
rect2.offset(i, i);
|
|
return rect2;
|
|
}
|
|
|
|
public static final RectF plus(RectF rectF, float f) {
|
|
RectF rectF2 = new RectF(rectF);
|
|
rectF2.offset(f, f);
|
|
return rectF2;
|
|
}
|
|
|
|
public static final Rect plus(Rect rect, Point point) {
|
|
Rect rect2 = new Rect(rect);
|
|
rect2.offset(point.x, point.y);
|
|
return rect2;
|
|
}
|
|
|
|
public static final RectF plus(RectF rectF, PointF pointF) {
|
|
RectF rectF2 = new RectF(rectF);
|
|
rectF2.offset(pointF.x, pointF.y);
|
|
return rectF2;
|
|
}
|
|
|
|
public static final Region minus(Rect rect, Rect rect2) {
|
|
Region region = new Region(rect);
|
|
region.op(rect2, Region.Op.DIFFERENCE);
|
|
return region;
|
|
}
|
|
|
|
public static final Region minus(RectF rectF, RectF rectF2) {
|
|
Rect rect = new Rect();
|
|
rectF.roundOut(rect);
|
|
Region region = new Region(rect);
|
|
Rect rect2 = new Rect();
|
|
rectF2.roundOut(rect2);
|
|
region.op(rect2, Region.Op.DIFFERENCE);
|
|
return region;
|
|
}
|
|
|
|
public static final Rect minus(Rect rect, int i) {
|
|
Rect rect2 = new Rect(rect);
|
|
int i2 = -i;
|
|
rect2.offset(i2, i2);
|
|
return rect2;
|
|
}
|
|
|
|
public static final RectF minus(RectF rectF, float f) {
|
|
RectF rectF2 = new RectF(rectF);
|
|
float f2 = -f;
|
|
rectF2.offset(f2, f2);
|
|
return rectF2;
|
|
}
|
|
|
|
public static final Rect minus(Rect rect, Point point) {
|
|
Rect rect2 = new Rect(rect);
|
|
rect2.offset(-point.x, -point.y);
|
|
return rect2;
|
|
}
|
|
|
|
public static final RectF minus(RectF rectF, PointF pointF) {
|
|
RectF rectF2 = new RectF(rectF);
|
|
rectF2.offset(-pointF.x, -pointF.y);
|
|
return rectF2;
|
|
}
|
|
|
|
public static final Rect times(Rect rect, int i) {
|
|
Rect rect2 = new Rect(rect);
|
|
rect2.top *= i;
|
|
rect2.left *= i;
|
|
rect2.right *= i;
|
|
rect2.bottom *= i;
|
|
return rect2;
|
|
}
|
|
|
|
public static final RectF times(RectF rectF, float f) {
|
|
RectF rectF2 = new RectF(rectF);
|
|
rectF2.top *= f;
|
|
rectF2.left *= f;
|
|
rectF2.right *= f;
|
|
rectF2.bottom *= f;
|
|
return rectF2;
|
|
}
|
|
|
|
public static final RectF times(RectF rectF, int i) {
|
|
float f = i;
|
|
RectF rectF2 = new RectF(rectF);
|
|
rectF2.top *= f;
|
|
rectF2.left *= f;
|
|
rectF2.right *= f;
|
|
rectF2.bottom *= f;
|
|
return rectF2;
|
|
}
|
|
|
|
@SuppressLint({"CheckResult"})
|
|
public static final Rect and(Rect rect, Rect rect2) {
|
|
Rect rect3 = new Rect(rect);
|
|
rect3.intersect(rect2);
|
|
return rect3;
|
|
}
|
|
|
|
@SuppressLint({"CheckResult"})
|
|
public static final RectF and(RectF rectF, RectF rectF2) {
|
|
RectF rectF3 = new RectF(rectF);
|
|
rectF3.intersect(rectF2);
|
|
return rectF3;
|
|
}
|
|
|
|
public static final Region xor(Rect rect, Rect rect2) {
|
|
Region region = new Region(rect);
|
|
region.op(rect2, Region.Op.XOR);
|
|
return region;
|
|
}
|
|
|
|
public static final Region xor(RectF rectF, RectF rectF2) {
|
|
Rect rect = new Rect();
|
|
rectF.roundOut(rect);
|
|
Region region = new Region(rect);
|
|
Rect rect2 = new Rect();
|
|
rectF2.roundOut(rect2);
|
|
region.op(rect2, Region.Op.XOR);
|
|
return region;
|
|
}
|
|
|
|
public static final boolean contains(Rect rect, Point point) {
|
|
return rect.contains(point.x, point.y);
|
|
}
|
|
|
|
public static final boolean contains(RectF rectF, PointF pointF) {
|
|
return rectF.contains(pointF.x, pointF.y);
|
|
}
|
|
|
|
public static final RectF toRectF(Rect rect) {
|
|
return new RectF(rect);
|
|
}
|
|
|
|
public static final Rect toRect(RectF rectF) {
|
|
Rect rect = new Rect();
|
|
rectF.roundOut(rect);
|
|
return rect;
|
|
}
|
|
|
|
public static final Region toRegion(Rect rect) {
|
|
return new Region(rect);
|
|
}
|
|
|
|
public static final Region toRegion(RectF rectF) {
|
|
Rect rect = new Rect();
|
|
rectF.roundOut(rect);
|
|
return new Region(rect);
|
|
}
|
|
|
|
public static final RectF transform(RectF rectF, Matrix matrix) {
|
|
matrix.mapRect(rectF);
|
|
return rectF;
|
|
}
|
|
}
|