blob: ec09238fc2dc1e8053336995fbf6f04bef40caf2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
package dev.isxander.yacl3.api.utils;
import dev.isxander.yacl3.impl.utils.DimensionIntegerImpl;
public interface Dimension<T extends Number> {
T x();
T y();
T width();
T height();
T xLimit();
T yLimit();
T centerX();
T centerY();
boolean isPointInside(T x, T y);
MutableDimension<T> clone();
Dimension<T> withX(T x);
Dimension<T> withY(T y);
Dimension<T> withWidth(T width);
Dimension<T> withHeight(T height);
Dimension<T> moved(T x, T y);
Dimension<T> expanded(T width, T height);
static MutableDimension<Integer> ofInt(int x, int y, int width, int height) {
return new DimensionIntegerImpl(x, y, width, height);
}
}
|