You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
scrcpy/server/src/main/java/com/genymobile/scrcpy/Position.java

49 lines
1.1 KiB
Java

package com.genymobile.scrcpy;
import java.util.Objects;
public class Position {
private Point point;
private Size screenSize;
public Position(Point point, Size screenSize) {
this.point = point;
this.screenSize = screenSize;
}
public Position(int x, int y, int screenWidth, int screenHeight) {
this(new Point(x, y), new Size(screenWidth, screenHeight));
}
public Point getPoint() {
return point;
}
public Size getScreenSize() {
return screenSize;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
Position position = (Position) o;
return Objects.equals(point, position.point) &&
Objects.equals(screenSize, position.screenSize);
}
@Override
public int hashCode() {
return Objects.hash(point, screenSize);
}
@Override
public String toString() {
return "Position{" +
"point=" + point +
", screenSize=" + screenSize +
'}';
}
}