[API] Add support for DockBuilder
This commit is contained in:
1 parent
b3b26e9136
commit
4e564240ca
11 files changed
+1057
-14
No files matched your search
@@ -0,0 +1,64 @@
|
||||
package imgui.internal;
|
||||
|
||||
import imgui.ImVec2;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* Helper: ImRect (2D axis aligned bounding-box)
|
||||
* NB: we can't rely on ImVec2 math operators being available here!
|
||||
*/
|
||||
public final class ImRect {
|
||||
/**
|
||||
* Upper-left
|
||||
*/
|
||||
public final ImVec2 min = new ImVec2();
|
||||
/**
|
||||
* Lower-right
|
||||
*/
|
||||
public final ImVec2 max = new ImVec2();
|
||||
|
||||
public ImRect() {
|
||||
}
|
||||
|
||||
public ImRect(final ImVec2 min, final ImVec2 max) {
|
||||
this.min.x = min.x;
|
||||
this.min.y = min.y;
|
||||
this.max.x = max.x;
|
||||
this.max.y = max.y;
|
||||
}
|
||||
|
||||
public ImRect(final float x1, final float y1, final float x2, final float y2) {
|
||||
min.x = x1;
|
||||
min.y = y1;
|
||||
max.x = x2;
|
||||
max.y = y2;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "ImRect{"
|
||||
+ "min=" + min
|
||||
+ ", max=" + max
|
||||
+ '}';
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(final Object o) {
|
||||
if (this == o) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (o == null || getClass() != o.getClass()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
final ImRect imRect = (ImRect) o;
|
||||
return Objects.equals(min, imRect.min) && Objects.equals(max, imRect.max);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(min, max);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user