mirror of
https://github.com/emilk/egui.git
synced 2026-09-03 15:20:05 -04:00
Handle painting of rectangles that start at negative infinity
This commit is contained in:
@@ -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.
|
// Common bug is to accidentally create an infinitely sized ractangle.
|
||||||
// Make sure we can visualize that:
|
// Make sure we can visualize that:
|
||||||
|
rect.min = rect.min.max(pos2(-1e7, -1e7));
|
||||||
rect.max = rect.max.min(pos2(1e7, 1e7));
|
rect.max = rect.max.min(pos2(1e7, 1e7));
|
||||||
|
|
||||||
let mut path = Path::default();
|
let mut path = Path::default();
|
||||||
|
|||||||
Reference in New Issue
Block a user