fix(gui): fix scissor error when scale not be 1
@@ -355,8 +355,8 @@ public final class GraphicsImpl implements Graphics {
return new Vector4f(newX, newY, newZ, newW);
}).get();
float height = peek.w() - peek.y();
- renderer.setScissor(Math.round(peek.x() * scaleX), frameHeight - Math.round((peek.y() + height) * scaleY),
- Math.round((peek.z() - peek.x()) * scaleX), Math.round(height * scaleY));
+ renderer.setScissor((int) (peek.x() * scaleX), (int) (frameHeight - (peek.y() + height) * scaleY),
+ (int) Math.ceil((peek.z() - peek.x()) * scaleX), (int) Math.ceil(height * scaleY));
}
private void resetModelMatrix() {
