diff options
Diffstat (limited to 'src/main/java/cc')
-rw-r--r-- | src/main/java/cc/polyfrost/oneconfig/lwjgl/Scissor.java | 10 | ||||
-rw-r--r-- | src/main/java/cc/polyfrost/oneconfig/lwjgl/ScissorManager.java | 6 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/main/java/cc/polyfrost/oneconfig/lwjgl/Scissor.java b/src/main/java/cc/polyfrost/oneconfig/lwjgl/Scissor.java index 93e104e..5709823 100644 --- a/src/main/java/cc/polyfrost/oneconfig/lwjgl/Scissor.java +++ b/src/main/java/cc/polyfrost/oneconfig/lwjgl/Scissor.java @@ -1,12 +1,12 @@ package cc.polyfrost.oneconfig.lwjgl; public class Scissor { - public int x; - public int y; - public int width; - public int height; + public float x; + public float y; + public float width; + public float height; - public Scissor(int x, int y, int width, int height) { + public Scissor(float x, float y, float width, float height) { this.x = x; this.y = y; this.width = width; diff --git a/src/main/java/cc/polyfrost/oneconfig/lwjgl/ScissorManager.java b/src/main/java/cc/polyfrost/oneconfig/lwjgl/ScissorManager.java index ee78eca..db85e86 100644 --- a/src/main/java/cc/polyfrost/oneconfig/lwjgl/ScissorManager.java +++ b/src/main/java/cc/polyfrost/oneconfig/lwjgl/ScissorManager.java @@ -7,7 +7,7 @@ import java.util.ArrayList; public class ScissorManager { private static final ArrayList<Scissor> scissors = new ArrayList<>(); - public static Scissor scissor(long vg, int x, int y, int width, int height) { + public static Scissor scissor(long vg, float x, float y, float width, float height) { Scissor scissor = new Scissor(x, y, width, height); if (scissors.contains(scissor)) return scissor; scissors.add(scissor); @@ -28,8 +28,8 @@ public class ScissorManager { Scissor finalScissor = new Scissor(scissors.get(0)); for (int i = 1; i < scissors.size(); i++) { Scissor scissor = scissors.get(i); - int rightX = Math.min(scissor.x + scissor.width, finalScissor.x + finalScissor.width); - int rightY = Math.min(scissor.y + scissor.height, finalScissor.y + finalScissor.height); + float rightX = Math.min(scissor.x + scissor.width, finalScissor.x + finalScissor.width); + float rightY = Math.min(scissor.y + scissor.height, finalScissor.y + finalScissor.height); finalScissor.x = Math.max(finalScissor.x, scissor.x); finalScissor.y = Math.max(finalScissor.y, scissor.y); finalScissor.width = rightX - finalScissor.x; |