mirror of
https://github.com/VibedByKaKi/alexandroid.git
synced 2026-12-01 02:03:24 +01:00
46 lines
1.2 KiB
Java
46 lines
1.2 KiB
Java
package androidx.constraintlayout.solver.widgets;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
/* loaded from: classes13.dex */
|
|
public class Rectangle {
|
|
public int height;
|
|
public int width;
|
|
public int x;
|
|
public int y;
|
|
|
|
public boolean contains(int i, int i2) {
|
|
int i3;
|
|
int i4 = this.x;
|
|
return i >= i4 && i < i4 + this.width && i2 >= (i3 = this.y) && i2 < i3 + this.height;
|
|
}
|
|
|
|
public int getCenterX() {
|
|
return (this.x + this.width) / 2;
|
|
}
|
|
|
|
public int getCenterY() {
|
|
return (this.y + this.height) / 2;
|
|
}
|
|
|
|
public void grow(int i, int i2) {
|
|
this.x -= i;
|
|
this.y -= i2;
|
|
this.width = (i * 2) + this.width;
|
|
this.height = (i2 * 2) + this.height;
|
|
}
|
|
|
|
public boolean intersects(Rectangle rectangle) {
|
|
int i;
|
|
int i2;
|
|
int i3 = this.x;
|
|
int i4 = rectangle.x;
|
|
return i3 >= i4 && i3 < i4 + rectangle.width && (i = this.y) >= (i2 = rectangle.y) && i < i2 + rectangle.height;
|
|
}
|
|
|
|
public void setBounds(int i, int i2, int i3, int i4) {
|
|
this.x = i;
|
|
this.y = i2;
|
|
this.width = i3;
|
|
this.height = i4;
|
|
}
|
|
}
|