110 lines
3.6 KiB
Java
110 lines
3.6 KiB
Java
package androidx.core.graphics;
|
|
|
|
import android.graphics.Point;
|
|
import android.graphics.PointF;
|
|
import d0.z.d.m;
|
|
/* compiled from: Point.kt */
|
|
public final class PointKt {
|
|
public static final float component1(PointF pointF) {
|
|
m.checkParameterIsNotNull(pointF, "$this$component1");
|
|
return pointF.x;
|
|
}
|
|
|
|
public static final int component1(Point point) {
|
|
m.checkParameterIsNotNull(point, "$this$component1");
|
|
return point.x;
|
|
}
|
|
|
|
public static final float component2(PointF pointF) {
|
|
m.checkParameterIsNotNull(pointF, "$this$component2");
|
|
return pointF.y;
|
|
}
|
|
|
|
public static final int component2(Point point) {
|
|
m.checkParameterIsNotNull(point, "$this$component2");
|
|
return point.y;
|
|
}
|
|
|
|
public static final Point minus(Point point, int i) {
|
|
m.checkParameterIsNotNull(point, "$this$minus");
|
|
Point point2 = new Point(point.x, point.y);
|
|
int i2 = -i;
|
|
point2.offset(i2, i2);
|
|
return point2;
|
|
}
|
|
|
|
public static final Point minus(Point point, Point point2) {
|
|
m.checkParameterIsNotNull(point, "$this$minus");
|
|
m.checkParameterIsNotNull(point2, "p");
|
|
Point point3 = new Point(point.x, point.y);
|
|
point3.offset(-point2.x, -point2.y);
|
|
return point3;
|
|
}
|
|
|
|
public static final PointF minus(PointF pointF, float f) {
|
|
m.checkParameterIsNotNull(pointF, "$this$minus");
|
|
PointF pointF2 = new PointF(pointF.x, pointF.y);
|
|
float f2 = -f;
|
|
pointF2.offset(f2, f2);
|
|
return pointF2;
|
|
}
|
|
|
|
public static final PointF minus(PointF pointF, PointF pointF2) {
|
|
m.checkParameterIsNotNull(pointF, "$this$minus");
|
|
m.checkParameterIsNotNull(pointF2, "p");
|
|
PointF pointF3 = new PointF(pointF.x, pointF.y);
|
|
pointF3.offset(-pointF2.x, -pointF2.y);
|
|
return pointF3;
|
|
}
|
|
|
|
public static final Point plus(Point point, int i) {
|
|
m.checkParameterIsNotNull(point, "$this$plus");
|
|
Point point2 = new Point(point.x, point.y);
|
|
point2.offset(i, i);
|
|
return point2;
|
|
}
|
|
|
|
public static final Point plus(Point point, Point point2) {
|
|
m.checkParameterIsNotNull(point, "$this$plus");
|
|
m.checkParameterIsNotNull(point2, "p");
|
|
Point point3 = new Point(point.x, point.y);
|
|
point3.offset(point2.x, point2.y);
|
|
return point3;
|
|
}
|
|
|
|
public static final PointF plus(PointF pointF, float f) {
|
|
m.checkParameterIsNotNull(pointF, "$this$plus");
|
|
PointF pointF2 = new PointF(pointF.x, pointF.y);
|
|
pointF2.offset(f, f);
|
|
return pointF2;
|
|
}
|
|
|
|
public static final PointF plus(PointF pointF, PointF pointF2) {
|
|
m.checkParameterIsNotNull(pointF, "$this$plus");
|
|
m.checkParameterIsNotNull(pointF2, "p");
|
|
PointF pointF3 = new PointF(pointF.x, pointF.y);
|
|
pointF3.offset(pointF2.x, pointF2.y);
|
|
return pointF3;
|
|
}
|
|
|
|
public static final Point toPoint(PointF pointF) {
|
|
m.checkParameterIsNotNull(pointF, "$this$toPoint");
|
|
return new Point((int) pointF.x, (int) pointF.y);
|
|
}
|
|
|
|
public static final PointF toPointF(Point point) {
|
|
m.checkParameterIsNotNull(point, "$this$toPointF");
|
|
return new PointF(point);
|
|
}
|
|
|
|
public static final Point unaryMinus(Point point) {
|
|
m.checkParameterIsNotNull(point, "$this$unaryMinus");
|
|
return new Point(-point.x, -point.y);
|
|
}
|
|
|
|
public static final PointF unaryMinus(PointF pointF) {
|
|
m.checkParameterIsNotNull(pointF, "$this$unaryMinus");
|
|
return new PointF(-pointF.x, -pointF.y);
|
|
}
|
|
}
|