-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix visual glitch on the right side of highly rounded rectangles #4244
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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).
Merged
emilk
added a commit
that referenced
this pull request
Mar 29, 2024
## egui changelog ### 🐛 Fixed * Fix visual glitch on the right side of highly rounded rectangles [#4244](#4244) * Prevent visual glitch when shadow blur width is very high [#4245](#4245) * Fix `InputState::any_touches` and add `InputState::has_touch_screen` [#4247](#4247) * Fix `Context::repaint_causes` returning no causes [#4248](#4248) * Fix touch-and-hold to open context menu [#4249](#4249) * Hide shortcut text on zoom buttons if `zoom_with_keyboard` is false [#4262](#4262) ### 🔧 Changed * Don't apply a clip rect to the contents of an `Area` or `Window` [#4258](#4258) ## eframe changelog * Web: repaint if the `#hash` in the URL changes [#4261](#4261) * Add web support for `zoom_factor` [#4260](#4260) (thanks [@justusdieckmann](https://github.com/justusdieckmann)!) --------- Co-authored-by: Justus Dieckmann <45795270+justusdieckmann@users.noreply.github.com>
emilk
added a commit
to emilk/egui_plot
that referenced
this pull request
Jul 15, 2024
## egui changelog ### 🐛 Fixed * Fix visual glitch on the right side of highly rounded rectangles [#4244](emilk/egui#4244) * Prevent visual glitch when shadow blur width is very high [#4245](emilk/egui#4245) * Fix `InputState::any_touches` and add `InputState::has_touch_screen` [#4247](emilk/egui#4247) * Fix `Context::repaint_causes` returning no causes [#4248](emilk/egui#4248) * Fix touch-and-hold to open context menu [#4249](emilk/egui#4249) * Hide shortcut text on zoom buttons if `zoom_with_keyboard` is false [#4262](emilk/egui#4262) ### 🔧 Changed * Don't apply a clip rect to the contents of an `Area` or `Window` [#4258](emilk/egui#4258) ## eframe changelog * Web: repaint if the `#hash` in the URL changes [#4261](emilk/egui#4261) * Add web support for `zoom_factor` [#4260](emilk/egui#4260) (thanks [@justusdieckmann](https://github.com/justusdieckmann)!) --------- Co-authored-by: Justus Dieckmann <45795270+justusdieckmann@users.noreply.github.com>
Hasenfellvy
added a commit
to Hasenfellvy/egui_plot
that referenced
this pull request
Aug 27, 2024
## egui changelog ### 🐛 Fixed * Fix visual glitch on the right side of highly rounded rectangles [#4244](emilk/egui#4244) * Prevent visual glitch when shadow blur width is very high [#4245](emilk/egui#4245) * Fix `InputState::any_touches` and add `InputState::has_touch_screen` [#4247](emilk/egui#4247) * Fix `Context::repaint_causes` returning no causes [#4248](emilk/egui#4248) * Fix touch-and-hold to open context menu [#4249](emilk/egui#4249) * Hide shortcut text on zoom buttons if `zoom_with_keyboard` is false [#4262](emilk/egui#4262) ### 🔧 Changed * Don't apply a clip rect to the contents of an `Area` or `Window` [#4258](emilk/egui#4258) ## eframe changelog * Web: repaint if the `#hash` in the URL changes [#4261](emilk/egui#4261) * Add web support for `zoom_factor` [#4260](emilk/egui#4260) (thanks [@justusdieckmann](https://github.com/justusdieckmann)!) --------- Co-authored-by: Justus Dieckmann <45795270+justusdieckmann@users.noreply.github.com>
hacknus
pushed a commit
to hacknus/egui
that referenced
this pull request
Oct 30, 2024
…lk#4244) * Part of emilk#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">
hacknus
pushed a commit
to hacknus/egui
that referenced
this pull request
Oct 30, 2024
## egui changelog ### 🐛 Fixed * Fix visual glitch on the right side of highly rounded rectangles [emilk#4244](emilk#4244) * Prevent visual glitch when shadow blur width is very high [emilk#4245](emilk#4245) * Fix `InputState::any_touches` and add `InputState::has_touch_screen` [emilk#4247](emilk#4247) * Fix `Context::repaint_causes` returning no causes [emilk#4248](emilk#4248) * Fix touch-and-hold to open context menu [emilk#4249](emilk#4249) * Hide shortcut text on zoom buttons if `zoom_with_keyboard` is false [emilk#4262](emilk#4262) ### 🔧 Changed * Don't apply a clip rect to the contents of an `Area` or `Window` [emilk#4258](emilk#4258) ## eframe changelog * Web: repaint if the `#hash` in the URL changes [emilk#4261](emilk#4261) * Add web support for `zoom_factor` [emilk#4260](emilk#4260) (thanks [@justusdieckmann](https://github.com/justusdieckmann)!) --------- Co-authored-by: Justus Dieckmann <45795270+justusdieckmann@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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: