egui/crates
Emil Ernerfeldt 947b5813d7
Fix visual glitch on the right side of highly rounded rectangles (#4244)
* Part of https://github.com/emilk/egui/issues/4238

When one side of a rectangle is all rounding we need to take care not to
produce duplicated vertices in the rectangle path generator.

The old code only handled three sides, but forgot the last side (the
right side).
The new code handles the right side, and also handles the other sides
more robustly (with a floating point eps) and efficiently (in a single
pass).

The glitch was most notable in shadows with a high blur width.

Examples of the glitch:

<img width="203" alt="Screenshot 2024-03-26 at 20 15 38"
src="https://github.com/emilk/egui/assets/1148717/dc1c0a06-35f0-4fda-a011-0e37d18454a0">

<img width="220" alt="Screenshot 2024-03-27 at 09 48 48"
src="https://github.com/emilk/egui/assets/1148717/c278b28e-c3f9-4c82-ba20-0480621efd2f">

<img width="33" alt="Screenshot 2024-03-27 at 09 49 21"
src="https://github.com/emilk/egui/assets/1148717/379ddf77-6590-4444-9c2e-67ab1e071f0f">
2024-03-27 10:13:49 +01:00
..
ecolor Release 0.27.0 - Nicer menus and new hit test logic 2024-03-26 17:13:57 +01:00
eframe Release 0.27.0 - Nicer menus and new hit test logic 2024-03-26 17:13:57 +01:00
egui Enforce writing username in TODO comments (#4235) 2024-03-26 11:48:24 +01:00
egui-wgpu Release 0.27.0 - Nicer menus and new hit test logic 2024-03-26 17:13:57 +01:00
egui-winit Release 0.27.0 - Nicer menus and new hit test logic 2024-03-26 17:13:57 +01:00
egui_demo_app egui demo: Add drop down to resize the window (#4197) 2024-03-25 13:11:39 +01:00
egui_demo_lib Enforce writing username in TODO comments (#4235) 2024-03-26 11:48:24 +01:00
egui_extras Release 0.27.0 - Nicer menus and new hit test logic 2024-03-26 17:13:57 +01:00
egui_glow Release 0.27.0 - Nicer menus and new hit test logic 2024-03-26 17:13:57 +01:00
egui_plot Release 0.27.0 - Nicer menus and new hit test logic 2024-03-26 17:13:57 +01:00
egui_web Fix typos (#2866) 2023-04-18 15:52:45 +02:00
emath Add some tests for `Rect` 2024-03-26 11:13:04 +01:00
epaint Fix visual glitch on the right side of highly rounded rectangles (#4244) 2024-03-27 10:13:49 +01:00