From a0e867972e86c8de5b63d5434632b7d693b6e5ad Mon Sep 17 00:00:00 2001 From: Calcoph <34724728+Calcoph@users.noreply.github.com> Date: Sun, 10 Sep 2023 21:57:33 +0200 Subject: [PATCH] fix #99 --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 83ebf95..d363d29 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -730,8 +730,8 @@ impl Renderer { let scissors = ( clip_rect[0].max(0.0).floor() as u32, clip_rect[1].max(0.0).floor() as u32, - (clip_rect[2].min(fb_size[0]) - clip_rect[0]).abs().ceil() as u32, - (clip_rect[3].min(fb_size[1]) - clip_rect[1]).abs().ceil() as u32, + (clip_rect[2].min(fb_size[0]) - clip_rect[0].max(0.0)).abs().ceil() as u32, + (clip_rect[3].min(fb_size[1]) - clip_rect[1].max(0.0)).abs().ceil() as u32, ); // XXX: Work-around for wgpu issue [1] by only issuing draw