From 4ba69e3a118263004918e08acb17a5bb5ab92b16 Mon Sep 17 00:00:00 2001 From: Emil Ernerfeldt Date: Sun, 10 May 2020 19:04:29 +0200 Subject: [PATCH] Handle painting of rectangles that start at negative infinity --- emigui/src/mesher.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/emigui/src/mesher.rs b/emigui/src/mesher.rs index 87ad3af0..14ade799 100644 --- a/emigui/src/mesher.rs +++ b/emigui/src/mesher.rs @@ -459,6 +459,7 @@ pub fn mesh_command(options: MesherOptions, fonts: &Fonts, command: PaintCmd, ou } => { // Common bug is to accidentally create an infinitely sized ractangle. // Make sure we can visualize that: + rect.min = rect.min.max(pos2(-1e7, -1e7)); rect.max = rect.max.min(pos2(1e7, 1e7)); let mut path = Path::default();