This fixes a bug which sometimes would make it possible to interact with widgets that were outside the parent clip_rect. Interaction with a widget is done with the `interact_rect`, which is the intersection of the widget rect and the parent clip rect. If these rectangles are disjoint (the widget is outside the parent clip rect), this results in a _negative rectangle_ (a rectangle with a negative width and/or height). The distance tests for negative rectangles were broken, causing the bug. * This is part of solving https://github.com/emilk/egui/issues/4475 * It is also likely this would have solved https://github.com/emilk/egui/issues/4349 (which now has another fix for it) ### Breaking changes `Rect::distance_to_pos`, `distance_sq_to_pos`, `signed_distance_to_pos` now all return `f32::INFINITY` if the rectangle is negative. |
||
|---|---|---|
| .. | ||
| src | ||
| Cargo.toml | ||
| README.md | ||
README.md
emath - egui math library
A bare-bones 2D math library with types and functions useful for GUI building.
Made for egui.